Skip to content

react: Make exercise schema-compliant #697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions exercises/react/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"#": [
"exercise": "react",
"version": "1.0.0",
"comments": [
"Note that, due to the nature of this exercise,",
"the tests are specified using their cells and a series of operations to perform on the cells.",
"",
Expand Down Expand Up @@ -43,6 +45,7 @@
"cases": [
{
"description": "input cells have a value",
"property": "react",
"cells": [
{
"name": "input",
Expand All @@ -60,6 +63,7 @@
},
{
"description": "an input cell's value can be set",
"property": "react",
"cells": [
{
"name": "input",
Expand All @@ -82,6 +86,7 @@
},
{
"description": "compute cells calculate initial value",
"property": "react",
"cells": [
{
"name": "input",
Expand All @@ -105,6 +110,7 @@
},
{
"description": "compute cells take inputs in the right order",
"property": "react",
"cells": [
{
"name": "one",
Expand Down Expand Up @@ -133,6 +139,7 @@
},
{
"description": "compute cells update value when dependencies are changed",
"property": "react",
"cells": [
{
"name": "input",
Expand Down Expand Up @@ -161,6 +168,7 @@
},
{
"description": "compute cells can depend on other compute cells",
"property": "react",
"cells": [
{
"name": "input",
Expand Down Expand Up @@ -206,6 +214,7 @@
},
{
"description": "compute cells fire callbacks",
"property": "react",
"cells": [
{
"name": "input",
Expand Down Expand Up @@ -239,6 +248,7 @@
},
{
"description": "callback cells only fire on change",
"property": "react",
"cells": [
{
"name": "input",
Expand Down Expand Up @@ -282,6 +292,7 @@
},
{
"description": "callbacks can be added and removed",
"property": "react",
"cells": [
{
"name": "input",
Expand Down Expand Up @@ -345,11 +356,12 @@
},
{
"description": "removing a callback multiple times doesn't interfere with other callbacks",
"#": [
"comments": [
"Some incorrect implementations store their callbacks in an array",
"and removing a callback repeatedly either removes an unrelated callback",
"or causes an out of bounds access."
],
"property": "react",
"cells": [
{
"name": "input",
Expand Down Expand Up @@ -408,10 +420,11 @@
},
{
"description": "callbacks should only be called once even if multiple dependencies change",
"#": [
"comments": [
"Some incorrect implementations call a callback function too early,",
"when not all of the inputs of a compute cell have propagated new values."
],
"property": "react",
"cells": [
{
"name": "input",
Expand Down Expand Up @@ -463,11 +476,12 @@
},
{
"description": "callbacks should not be called if dependencies change but output value doesn't change",
"#": [
"comments": [
"Some incorrect implementations simply mark a compute cell as dirty when a dependency changes,",
"then call callbacks on all dirty cells.",
"This is incorrect since the specification indicates only to call callbacks on change."
],
"property": "react",
"cells": [
{
"name": "input",
Expand Down