diff --git a/exercises/practice/wordy/.meta/config.json b/exercises/practice/wordy/.meta/config.json index a3810cd22b..b3381e5f81 100644 --- a/exercises/practice/wordy/.meta/config.json +++ b/exercises/practice/wordy/.meta/config.json @@ -4,6 +4,7 @@ ], "contributors": [ "hyuko21", + "jagdish-15", "msomji", "ovidiu141", "rchavarria", diff --git a/exercises/practice/wordy/.meta/tests.toml b/exercises/practice/wordy/.meta/tests.toml index 912d576009..a0a83ed0b9 100644 --- a/exercises/practice/wordy/.meta/tests.toml +++ b/exercises/practice/wordy/.meta/tests.toml @@ -1,13 +1,32 @@ -# This is an auto-generated file. Regular comments will be removed when this -# file is regenerated. Regenerating will not touch any manually added keys, -# so comments can be added in a "comment" key. +# This is an auto-generated file. +# +# Regenerating this file via `configlet sync` will: +# - Recreate every `description` key/value pair +# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications +# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion) +# - Preserve any other key/value pair +# +# As user-added comments (using the # character) will be removed when this file +# is regenerated, comments can be added via a `comment` key. [88bf4b28-0de3-4883-93c7-db1b14aa806e] description = "just a number" +[18983214-1dfc-4ebd-ac77-c110dde699ce] +description = "just a zero" + +[607c08ee-2241-4288-916d-dae5455c87e6] +description = "just a negative number" + [bb8c655c-cf42-4dfc-90e0-152fcfd8d4e0] description = "addition" +[bb9f2082-171c-46ad-ad4e-c3f72087c1b5] +description = "addition with a left hand zero" + +[6fa05f17-405a-4742-80ae-5d1a8edb0d5d] +description = "addition with a right hand zero" + [79e49e06-c5ae-40aa-a352-7a3a01f70015] description = "more addition" diff --git a/exercises/practice/wordy/wordy.spec.js b/exercises/practice/wordy/wordy.spec.js index e541962ff0..1be21e3dca 100644 --- a/exercises/practice/wordy/wordy.spec.js +++ b/exercises/practice/wordy/wordy.spec.js @@ -6,10 +6,26 @@ describe('Wordy', () => { expect(answer('What is 5?')).toEqual(5); }); + xtest('just a zero', () => { + expect(answer('What is 0?')).toEqual(0); + }); + + xtest('just a negative number', () => { + expect(answer('What is -123?')).toEqual(-123); + }); + xtest('addition', () => { expect(answer('What is 1 plus 1?')).toEqual(2); }); + xtest('addition with a left hand zero', () => { + expect(answer('What is 0 plus 2?')).toEqual(2); + }); + + xtest('addition with a right hand zero', () => { + expect(answer('What is 3 plus 0?')).toEqual(3); + }); + xtest('more addition', () => { expect(answer('What is 53 plus 2?')).toEqual(55); });