|
1 | 1 | {
|
2 |
| - "#": [ |
| 2 | + "exercise": "react", |
| 3 | + "version": "1.0.0", |
| 4 | + "comments": [ |
3 | 5 | "Note that, due to the nature of this exercise,",
|
4 | 6 | "the tests are specified using their cells and a series of operations to perform on the cells.",
|
5 | 7 | "",
|
|
43 | 45 | "cases": [
|
44 | 46 | {
|
45 | 47 | "description": "input cells have a value",
|
| 48 | + "property": "react", |
46 | 49 | "cells": [
|
47 | 50 | {
|
48 | 51 | "name": "input",
|
|
60 | 63 | },
|
61 | 64 | {
|
62 | 65 | "description": "an input cell's value can be set",
|
| 66 | + "property": "react", |
63 | 67 | "cells": [
|
64 | 68 | {
|
65 | 69 | "name": "input",
|
|
82 | 86 | },
|
83 | 87 | {
|
84 | 88 | "description": "compute cells calculate initial value",
|
| 89 | + "property": "react", |
85 | 90 | "cells": [
|
86 | 91 | {
|
87 | 92 | "name": "input",
|
|
105 | 110 | },
|
106 | 111 | {
|
107 | 112 | "description": "compute cells take inputs in the right order",
|
| 113 | + "property": "react", |
108 | 114 | "cells": [
|
109 | 115 | {
|
110 | 116 | "name": "one",
|
|
133 | 139 | },
|
134 | 140 | {
|
135 | 141 | "description": "compute cells update value when dependencies are changed",
|
| 142 | + "property": "react", |
136 | 143 | "cells": [
|
137 | 144 | {
|
138 | 145 | "name": "input",
|
|
161 | 168 | },
|
162 | 169 | {
|
163 | 170 | "description": "compute cells can depend on other compute cells",
|
| 171 | + "property": "react", |
164 | 172 | "cells": [
|
165 | 173 | {
|
166 | 174 | "name": "input",
|
|
206 | 214 | },
|
207 | 215 | {
|
208 | 216 | "description": "compute cells fire callbacks",
|
| 217 | + "property": "react", |
209 | 218 | "cells": [
|
210 | 219 | {
|
211 | 220 | "name": "input",
|
|
239 | 248 | },
|
240 | 249 | {
|
241 | 250 | "description": "callback cells only fire on change",
|
| 251 | + "property": "react", |
242 | 252 | "cells": [
|
243 | 253 | {
|
244 | 254 | "name": "input",
|
|
282 | 292 | },
|
283 | 293 | {
|
284 | 294 | "description": "callbacks can be added and removed",
|
| 295 | + "property": "react", |
285 | 296 | "cells": [
|
286 | 297 | {
|
287 | 298 | "name": "input",
|
|
345 | 356 | },
|
346 | 357 | {
|
347 | 358 | "description": "removing a callback multiple times doesn't interfere with other callbacks",
|
348 |
| - "#": [ |
| 359 | + "comments": [ |
349 | 360 | "Some incorrect implementations store their callbacks in an array",
|
350 | 361 | "and removing a callback repeatedly either removes an unrelated callback",
|
351 | 362 | "or causes an out of bounds access."
|
352 | 363 | ],
|
| 364 | + "property": "react", |
353 | 365 | "cells": [
|
354 | 366 | {
|
355 | 367 | "name": "input",
|
|
408 | 420 | },
|
409 | 421 | {
|
410 | 422 | "description": "callbacks should only be called once even if multiple dependencies change",
|
411 |
| - "#": [ |
| 423 | + "comments": [ |
412 | 424 | "Some incorrect implementations call a callback function too early,",
|
413 | 425 | "when not all of the inputs of a compute cell have propagated new values."
|
414 | 426 | ],
|
| 427 | + "property": "react", |
415 | 428 | "cells": [
|
416 | 429 | {
|
417 | 430 | "name": "input",
|
|
463 | 476 | },
|
464 | 477 | {
|
465 | 478 | "description": "callbacks should not be called if dependencies change but output value doesn't change",
|
466 |
| - "#": [ |
| 479 | + "comments": [ |
467 | 480 | "Some incorrect implementations simply mark a compute cell as dirty when a dependency changes,",
|
468 | 481 | "then call callbacks on all dirty cells.",
|
469 | 482 | "This is incorrect since the specification indicates only to call callbacks on change."
|
470 | 483 | ],
|
| 484 | + "property": "react", |
471 | 485 | "cells": [
|
472 | 486 | {
|
473 | 487 | "name": "input",
|
|
0 commit comments