From 8feaf6acba00e0ffbecb5baaa917901916bc4271 Mon Sep 17 00:00:00 2001 From: rbasso Date: Sat, 11 Mar 2017 15:09:33 +0900 Subject: [PATCH] react: Make canonical-data.json compliant --- exercises/react/canonical-data.json | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/exercises/react/canonical-data.json b/exercises/react/canonical-data.json index a960bfe273..e898d88d82 100644 --- a/exercises/react/canonical-data.json +++ b/exercises/react/canonical-data.json @@ -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.", "", @@ -43,6 +45,7 @@ "cases": [ { "description": "input cells have a value", + "property": "react", "cells": [ { "name": "input", @@ -60,6 +63,7 @@ }, { "description": "an input cell's value can be set", + "property": "react", "cells": [ { "name": "input", @@ -82,6 +86,7 @@ }, { "description": "compute cells calculate initial value", + "property": "react", "cells": [ { "name": "input", @@ -105,6 +110,7 @@ }, { "description": "compute cells take inputs in the right order", + "property": "react", "cells": [ { "name": "one", @@ -133,6 +139,7 @@ }, { "description": "compute cells update value when dependencies are changed", + "property": "react", "cells": [ { "name": "input", @@ -161,6 +168,7 @@ }, { "description": "compute cells can depend on other compute cells", + "property": "react", "cells": [ { "name": "input", @@ -206,6 +214,7 @@ }, { "description": "compute cells fire callbacks", + "property": "react", "cells": [ { "name": "input", @@ -239,6 +248,7 @@ }, { "description": "callback cells only fire on change", + "property": "react", "cells": [ { "name": "input", @@ -282,6 +292,7 @@ }, { "description": "callbacks can be added and removed", + "property": "react", "cells": [ { "name": "input", @@ -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", @@ -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", @@ -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",