From 7a669be61f51c4a8e20a969f034198dbb6cdf385 Mon Sep 17 00:00:00 2001 From: Jagdish Prajapati Date: Sun, 22 Jun 2025 13:12:42 +0530 Subject: [PATCH 1/5] Syncing toml file --- .../kindergarten-garden/.meta/tests.toml | 55 +++++++++++++++---- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/exercises/practice/kindergarten-garden/.meta/tests.toml b/exercises/practice/kindergarten-garden/.meta/tests.toml index 1778a61530..0cdd9ad64d 100644 --- a/exercises/practice/kindergarten-garden/.meta/tests.toml +++ b/exercises/practice/kindergarten-garden/.meta/tests.toml @@ -1,30 +1,61 @@ -# 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. [1fc316ed-17ab-4fba-88ef-3ae78296b692] -description = "garden with single student" +description = "partial garden -> garden with single student" [acd19dc1-2200-4317-bc2a-08f021276b40] -description = "different garden with single student" +description = "partial garden -> different garden with single student" [c376fcc8-349c-446c-94b0-903947315757] -description = "garden with two students" +description = "partial garden -> garden with two students" [2d620f45-9617-4924-9d27-751c80d17db9] -description = "second student's garden" +description = "partial garden -> multiple students for the same garden with three students -> second student's garden" [57712331-4896-4364-89f8-576421d69c44] -description = "third student's garden" +description = "partial garden -> multiple students for the same garden with three students -> third student's garden" [149b4290-58e1-40f2-8ae4-8b87c46e765b] -description = "first student's garden" +description = "full garden -> for Alice, first student's garden" [ba25dbbc-10bd-4a37-b18e-f89ecd098a5e] -description = "second student's garden" +description = "full garden -> for Bob, second student's garden" + +[566b621b-f18e-4c5f-873e-be30544b838c] +description = "full garden -> for Charlie" + +[3ad3df57-dd98-46fc-9269-1877abf612aa] +description = "full garden -> for David" + +[0f0a55d1-9710-46ed-a0eb-399ba8c72db2] +description = "full garden -> for Eve" + +[a7e80c90-b140-4ea1-aee3-f4625365c9a4] +description = "full garden -> for Fred" + +[9d94b273-2933-471b-86e8-dba68694c615] +description = "full garden -> for Ginny" + +[f55bc6c2-ade8-4844-87c4-87196f1b7258] +description = "full garden -> for Harriet" + +[759070a3-1bb1-4dd4-be2c-7cce1d7679ae] +description = "full garden -> for Ileana" + +[78578123-2755-4d4a-9c7d-e985b8dda1c6] +description = "full garden -> for Joseph" [6bb66df7-f433-41ab-aec2-3ead6e99f65b] -description = "second to last student's garden" +description = "full garden -> for Kincaid, second to last student's garden" [d7edec11-6488-418a-94e6-ed509e0fa7eb] -description = "last student's garden" +description = "full garden -> for Larry, last student's garden" From 4ceb5a8b013a99aecd841d955537fbf6b7c2e111 Mon Sep 17 00:00:00 2001 From: Jagdish Prajapati Date: Sun, 22 Jun 2025 13:13:09 +0530 Subject: [PATCH 2/5] Updating test file --- .../kindergarten-garden.spec.js | 408 +++++++++--------- 1 file changed, 205 insertions(+), 203 deletions(-) diff --git a/exercises/practice/kindergarten-garden/kindergarten-garden.spec.js b/exercises/practice/kindergarten-garden/kindergarten-garden.spec.js index 3d980989e8..205e22fbd4 100644 --- a/exercises/practice/kindergarten-garden/kindergarten-garden.spec.js +++ b/exercises/practice/kindergarten-garden/kindergarten-garden.spec.js @@ -1,239 +1,241 @@ import { describe, expect, test, xtest } from '@jest/globals'; import { Garden } from './kindergarten-garden'; -describe('partial Garden', () => { - test('garden with single student', () => { - expect(new Garden('RC\nGG').plants('Alice')).toEqual([ - 'radishes', - 'clover', - 'grass', - 'grass', - ]); - }); +describe('Kindergarten Garden', () => { + describe('partial Garden', () => { + test('garden with single student', () => { + expect(new Garden('RC\nGG').plants('Alice')).toEqual([ + 'radishes', + 'clover', + 'grass', + 'grass', + ]); + }); - xtest('different garden with single student', () => { - expect(new Garden('VC\nRC').plants('Alice')).toEqual([ - 'violets', - 'clover', - 'radishes', - 'clover', - ]); - }); + xtest('different garden with single student', () => { + expect(new Garden('VC\nRC').plants('Alice')).toEqual([ + 'violets', + 'clover', + 'radishes', + 'clover', + ]); + }); - xtest('garden with two students', () => { - expect(new Garden('VVCG\nVVRC').plants('Bob')).toEqual([ - 'clover', - 'grass', - 'radishes', - 'clover', - ]); + xtest('garden with two students', () => { + expect(new Garden('VVCG\nVVRC').plants('Bob')).toEqual([ + 'clover', + 'grass', + 'radishes', + 'clover', + ]); + }); + + describe('multiple students for the same garden with three students', () => { + xtest("second student's garden", () => { + expect(new Garden('VVCCGG\nVVCCGG').plants('Bob')).toEqual([ + 'clover', + 'clover', + 'clover', + 'clover', + ]); + }); + + xtest("third student's garden", () => { + expect(new Garden('VVCCGG\nVVCCGG').plants('Charlie')).toEqual([ + 'grass', + 'grass', + 'grass', + 'grass', + ]); + }); + }); }); - describe('multiple students for the same garden with three students', () => { - xtest("second student's garden", () => { - expect(new Garden('VVCCGG\nVVCCGG').plants('Bob')).toEqual([ - 'clover', + describe('full garden', () => { + const diagram = 'VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV'; + const garden = new Garden(diagram); + + xtest("for Alice, first student's garden", () => { + expect(garden.plants('Alice')).toEqual([ + 'violets', + 'radishes', + 'violets', + 'radishes', + ]); + }); + + xtest("for Bob, second student's garden", () => { + expect(garden.plants('Bob')).toEqual([ 'clover', + 'grass', 'clover', 'clover', ]); }); - xtest("third student's garden", () => { - expect(new Garden('VVCCGG\nVVCCGG').plants('Charlie')).toEqual([ - 'grass', - 'grass', - 'grass', + xtest('for Charlie', () => { + expect(garden.plants('Charlie')).toEqual([ + 'violets', + 'violets', + 'clover', 'grass', ]); }); - }); -}); - -describe('full garden', () => { - const diagram = 'VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV'; - const garden = new Garden(diagram); - - xtest("for Alice, first student's garden", () => { - expect(garden.plants('Alice')).toEqual([ - 'violets', - 'radishes', - 'violets', - 'radishes', - ]); - }); - xtest("for Bob, second student's garden", () => { - expect(garden.plants('Bob')).toEqual([ - 'clover', - 'grass', - 'clover', - 'clover', - ]); - }); + xtest('for David', () => { + expect(garden.plants('David')).toEqual([ + 'radishes', + 'violets', + 'clover', + 'radishes', + ]); + }); - xtest('for Charlie', () => { - expect(garden.plants('Charlie')).toEqual([ - 'violets', - 'violets', - 'clover', - 'grass', - ]); - }); + xtest('for Eve', () => { + expect(garden.plants('Eve')).toEqual([ + 'clover', + 'grass', + 'radishes', + 'grass', + ]); + }); - xtest('for David', () => { - expect(garden.plants('David')).toEqual([ - 'radishes', - 'violets', - 'clover', - 'radishes', - ]); - }); + xtest('for Fred', () => { + expect(garden.plants('Fred')).toEqual([ + 'grass', + 'clover', + 'violets', + 'clover', + ]); + }); - xtest('for Eve', () => { - expect(garden.plants('Eve')).toEqual([ - 'clover', - 'grass', - 'radishes', - 'grass', - ]); - }); + xtest('for Ginny', () => { + expect(garden.plants('Ginny')).toEqual([ + 'clover', + 'grass', + 'grass', + 'clover', + ]); + }); - xtest('for Fred', () => { - expect(garden.plants('Fred')).toEqual([ - 'grass', - 'clover', - 'violets', - 'clover', - ]); - }); + xtest('for Harriet', () => { + expect(garden.plants('Harriet')).toEqual([ + 'violets', + 'radishes', + 'radishes', + 'violets', + ]); + }); - xtest('for Ginny', () => { - expect(garden.plants('Ginny')).toEqual([ - 'clover', - 'grass', - 'grass', - 'clover', - ]); - }); + xtest('for Ileana', () => { + expect(garden.plants('Ileana')).toEqual([ + 'grass', + 'clover', + 'violets', + 'clover', + ]); + }); - xtest('for Harriet', () => { - expect(garden.plants('Harriet')).toEqual([ - 'violets', - 'radishes', - 'radishes', - 'violets', - ]); - }); + xtest('for Joseph', () => { + expect(garden.plants('Joseph')).toEqual([ + 'violets', + 'clover', + 'violets', + 'grass', + ]); + }); - xtest('for Ileana', () => { - expect(garden.plants('Ileana')).toEqual([ - 'grass', - 'clover', - 'violets', - 'clover', - ]); - }); + xtest("for Kincaid, second to last student's garden", () => { + expect(garden.plants('Kincaid')).toEqual([ + 'grass', + 'clover', + 'clover', + 'grass', + ]); + }); - xtest('for Joseph', () => { - expect(garden.plants('Joseph')).toEqual([ - 'violets', - 'clover', - 'violets', - 'grass', - ]); + xtest("for Larry, last student's garden", () => { + expect(garden.plants('Larry')).toEqual([ + 'grass', + 'violets', + 'clover', + 'violets', + ]); + }); }); - xtest("for Kincaid, second to last student's garden", () => { - expect(garden.plants('Kincaid')).toEqual([ - 'grass', - 'clover', - 'clover', - 'grass', - ]); - }); + describe('disordered class', () => { + const diagram = 'VCRRGVRG\nRVGCCGCV'; + const students = ['Samantha', 'Patricia', 'Xander', 'Roger']; + const garden = new Garden(diagram, students); - xtest("for Larry, last student's garden", () => { - expect(garden.plants('Larry')).toEqual([ - 'grass', - 'violets', - 'clover', - 'violets', - ]); - }); -}); + xtest('for Patricia', () => { + expect(garden.plants('Patricia')).toEqual([ + 'violets', + 'clover', + 'radishes', + 'violets', + ]); + }); -describe('disordered class', () => { - const diagram = 'VCRRGVRG\nRVGCCGCV'; - const students = ['Samantha', 'Patricia', 'Xander', 'Roger']; - const garden = new Garden(diagram, students); - - xtest('for Patricia', () => { - expect(garden.plants('Patricia')).toEqual([ - 'violets', - 'clover', - 'radishes', - 'violets', - ]); - }); + xtest('for Roger', () => { + expect(garden.plants('Roger')).toEqual([ + 'radishes', + 'radishes', + 'grass', + 'clover', + ]); + }); - xtest('for Roger', () => { - expect(garden.plants('Roger')).toEqual([ - 'radishes', - 'radishes', - 'grass', - 'clover', - ]); - }); + xtest('for Samantha', () => { + expect(garden.plants('Samantha')).toEqual([ + 'grass', + 'violets', + 'clover', + 'grass', + ]); + }); - xtest('for Samantha', () => { - expect(garden.plants('Samantha')).toEqual([ - 'grass', - 'violets', - 'clover', - 'grass', - ]); + xtest('for Xander', () => { + expect(garden.plants('Xander')).toEqual([ + 'radishes', + 'grass', + 'clover', + 'violets', + ]); + }); }); - xtest('for Xander', () => { - expect(garden.plants('Xander')).toEqual([ - 'radishes', - 'grass', - 'clover', - 'violets', - ]); - }); -}); + describe('Two gardens, different students', () => { + const diagram = 'VCRRGVRG\nRVGCCGCV'; + const garden1 = new Garden(diagram, ['Alice', 'Bob', 'Charlie', 'Dan']); + const garden2 = new Garden(diagram, ['Bob', 'Charlie', 'Dan', 'Erin']); -describe('Two gardens, different students', () => { - const diagram = 'VCRRGVRG\nRVGCCGCV'; - const garden1 = new Garden(diagram, ['Alice', 'Bob', 'Charlie', 'Dan']); - const garden2 = new Garden(diagram, ['Bob', 'Charlie', 'Dan', 'Erin']); - - xtest('Bob and Charlie for each garden', () => { - expect(garden1.plants('Bob')).toEqual([ - 'radishes', - 'radishes', - 'grass', - 'clover', - ]); - expect(garden2.plants('Bob')).toEqual([ - 'violets', - 'clover', - 'radishes', - 'violets', - ]); - expect(garden1.plants('Charlie')).toEqual([ - 'grass', - 'violets', - 'clover', - 'grass', - ]); - expect(garden2.plants('Charlie')).toEqual([ - 'radishes', - 'radishes', - 'grass', - 'clover', - ]); + xtest('Bob and Charlie for each garden', () => { + expect(garden1.plants('Bob')).toEqual([ + 'radishes', + 'radishes', + 'grass', + 'clover', + ]); + expect(garden2.plants('Bob')).toEqual([ + 'violets', + 'clover', + 'radishes', + 'violets', + ]); + expect(garden1.plants('Charlie')).toEqual([ + 'grass', + 'violets', + 'clover', + 'grass', + ]); + expect(garden2.plants('Charlie')).toEqual([ + 'radishes', + 'radishes', + 'grass', + 'clover', + ]); + }); }); }); From 259a4983c4622b4512e3ed7e7ab648f7d642c575 Mon Sep 17 00:00:00 2001 From: Jagdish Prajapati Date: Sun, 22 Jun 2025 13:13:49 +0530 Subject: [PATCH 3/5] Configuring config.json --- exercises/practice/kindergarten-garden/.meta/config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/exercises/practice/kindergarten-garden/.meta/config.json b/exercises/practice/kindergarten-garden/.meta/config.json index a5f555ad04..b42ea82a55 100644 --- a/exercises/practice/kindergarten-garden/.meta/config.json +++ b/exercises/practice/kindergarten-garden/.meta/config.json @@ -4,6 +4,7 @@ ], "contributors": [ "brendanmckeown", + "jagdish-15", "matthewmorgan", "ryanplusplus", "SleeplessByte", From 8c6c5ebc2a025e0711954d017d99cf678b0ec849 Mon Sep 17 00:00:00 2001 From: Jagdish Prajapati Date: Sun, 22 Jun 2025 21:06:08 +0530 Subject: [PATCH 4/5] Removing nesting in test file --- .../kindergarten-garden.spec.js | 408 +++++++++--------- 1 file changed, 203 insertions(+), 205 deletions(-) diff --git a/exercises/practice/kindergarten-garden/kindergarten-garden.spec.js b/exercises/practice/kindergarten-garden/kindergarten-garden.spec.js index 205e22fbd4..3d980989e8 100644 --- a/exercises/practice/kindergarten-garden/kindergarten-garden.spec.js +++ b/exercises/practice/kindergarten-garden/kindergarten-garden.spec.js @@ -1,241 +1,239 @@ import { describe, expect, test, xtest } from '@jest/globals'; import { Garden } from './kindergarten-garden'; -describe('Kindergarten Garden', () => { - describe('partial Garden', () => { - test('garden with single student', () => { - expect(new Garden('RC\nGG').plants('Alice')).toEqual([ - 'radishes', - 'clover', - 'grass', - 'grass', - ]); - }); - - xtest('different garden with single student', () => { - expect(new Garden('VC\nRC').plants('Alice')).toEqual([ - 'violets', - 'clover', - 'radishes', - 'clover', - ]); - }); - - xtest('garden with two students', () => { - expect(new Garden('VVCG\nVVRC').plants('Bob')).toEqual([ - 'clover', - 'grass', - 'radishes', - 'clover', - ]); - }); - - describe('multiple students for the same garden with three students', () => { - xtest("second student's garden", () => { - expect(new Garden('VVCCGG\nVVCCGG').plants('Bob')).toEqual([ - 'clover', - 'clover', - 'clover', - 'clover', - ]); - }); - - xtest("third student's garden", () => { - expect(new Garden('VVCCGG\nVVCCGG').plants('Charlie')).toEqual([ - 'grass', - 'grass', - 'grass', - 'grass', - ]); - }); - }); +describe('partial Garden', () => { + test('garden with single student', () => { + expect(new Garden('RC\nGG').plants('Alice')).toEqual([ + 'radishes', + 'clover', + 'grass', + 'grass', + ]); }); - describe('full garden', () => { - const diagram = 'VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV'; - const garden = new Garden(diagram); + xtest('different garden with single student', () => { + expect(new Garden('VC\nRC').plants('Alice')).toEqual([ + 'violets', + 'clover', + 'radishes', + 'clover', + ]); + }); - xtest("for Alice, first student's garden", () => { - expect(garden.plants('Alice')).toEqual([ - 'violets', - 'radishes', - 'violets', - 'radishes', - ]); - }); + xtest('garden with two students', () => { + expect(new Garden('VVCG\nVVRC').plants('Bob')).toEqual([ + 'clover', + 'grass', + 'radishes', + 'clover', + ]); + }); - xtest("for Bob, second student's garden", () => { - expect(garden.plants('Bob')).toEqual([ + describe('multiple students for the same garden with three students', () => { + xtest("second student's garden", () => { + expect(new Garden('VVCCGG\nVVCCGG').plants('Bob')).toEqual([ 'clover', - 'grass', 'clover', 'clover', - ]); - }); - - xtest('for Charlie', () => { - expect(garden.plants('Charlie')).toEqual([ - 'violets', - 'violets', - 'clover', - 'grass', - ]); - }); - - xtest('for David', () => { - expect(garden.plants('David')).toEqual([ - 'radishes', - 'violets', 'clover', - 'radishes', ]); }); - xtest('for Eve', () => { - expect(garden.plants('Eve')).toEqual([ - 'clover', + xtest("third student's garden", () => { + expect(new Garden('VVCCGG\nVVCCGG').plants('Charlie')).toEqual([ 'grass', - 'radishes', 'grass', - ]); - }); - - xtest('for Fred', () => { - expect(garden.plants('Fred')).toEqual([ 'grass', - 'clover', - 'violets', - 'clover', - ]); - }); - - xtest('for Ginny', () => { - expect(garden.plants('Ginny')).toEqual([ - 'clover', 'grass', - 'grass', - 'clover', ]); }); + }); +}); - xtest('for Harriet', () => { - expect(garden.plants('Harriet')).toEqual([ - 'violets', - 'radishes', - 'radishes', - 'violets', - ]); - }); +describe('full garden', () => { + const diagram = 'VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV'; + const garden = new Garden(diagram); + + xtest("for Alice, first student's garden", () => { + expect(garden.plants('Alice')).toEqual([ + 'violets', + 'radishes', + 'violets', + 'radishes', + ]); + }); - xtest('for Ileana', () => { - expect(garden.plants('Ileana')).toEqual([ - 'grass', - 'clover', - 'violets', - 'clover', - ]); - }); + xtest("for Bob, second student's garden", () => { + expect(garden.plants('Bob')).toEqual([ + 'clover', + 'grass', + 'clover', + 'clover', + ]); + }); - xtest('for Joseph', () => { - expect(garden.plants('Joseph')).toEqual([ - 'violets', - 'clover', - 'violets', - 'grass', - ]); - }); + xtest('for Charlie', () => { + expect(garden.plants('Charlie')).toEqual([ + 'violets', + 'violets', + 'clover', + 'grass', + ]); + }); - xtest("for Kincaid, second to last student's garden", () => { - expect(garden.plants('Kincaid')).toEqual([ - 'grass', - 'clover', - 'clover', - 'grass', - ]); - }); + xtest('for David', () => { + expect(garden.plants('David')).toEqual([ + 'radishes', + 'violets', + 'clover', + 'radishes', + ]); + }); - xtest("for Larry, last student's garden", () => { - expect(garden.plants('Larry')).toEqual([ - 'grass', - 'violets', - 'clover', - 'violets', - ]); - }); + xtest('for Eve', () => { + expect(garden.plants('Eve')).toEqual([ + 'clover', + 'grass', + 'radishes', + 'grass', + ]); }); - describe('disordered class', () => { - const diagram = 'VCRRGVRG\nRVGCCGCV'; - const students = ['Samantha', 'Patricia', 'Xander', 'Roger']; - const garden = new Garden(diagram, students); + xtest('for Fred', () => { + expect(garden.plants('Fred')).toEqual([ + 'grass', + 'clover', + 'violets', + 'clover', + ]); + }); - xtest('for Patricia', () => { - expect(garden.plants('Patricia')).toEqual([ - 'violets', - 'clover', - 'radishes', - 'violets', - ]); - }); + xtest('for Ginny', () => { + expect(garden.plants('Ginny')).toEqual([ + 'clover', + 'grass', + 'grass', + 'clover', + ]); + }); - xtest('for Roger', () => { - expect(garden.plants('Roger')).toEqual([ - 'radishes', - 'radishes', - 'grass', - 'clover', - ]); - }); + xtest('for Harriet', () => { + expect(garden.plants('Harriet')).toEqual([ + 'violets', + 'radishes', + 'radishes', + 'violets', + ]); + }); - xtest('for Samantha', () => { - expect(garden.plants('Samantha')).toEqual([ - 'grass', - 'violets', - 'clover', - 'grass', - ]); - }); + xtest('for Ileana', () => { + expect(garden.plants('Ileana')).toEqual([ + 'grass', + 'clover', + 'violets', + 'clover', + ]); + }); - xtest('for Xander', () => { - expect(garden.plants('Xander')).toEqual([ - 'radishes', - 'grass', - 'clover', - 'violets', - ]); - }); + xtest('for Joseph', () => { + expect(garden.plants('Joseph')).toEqual([ + 'violets', + 'clover', + 'violets', + 'grass', + ]); }); - describe('Two gardens, different students', () => { - const diagram = 'VCRRGVRG\nRVGCCGCV'; - const garden1 = new Garden(diagram, ['Alice', 'Bob', 'Charlie', 'Dan']); - const garden2 = new Garden(diagram, ['Bob', 'Charlie', 'Dan', 'Erin']); + xtest("for Kincaid, second to last student's garden", () => { + expect(garden.plants('Kincaid')).toEqual([ + 'grass', + 'clover', + 'clover', + 'grass', + ]); + }); - xtest('Bob and Charlie for each garden', () => { - expect(garden1.plants('Bob')).toEqual([ - 'radishes', - 'radishes', - 'grass', - 'clover', - ]); - expect(garden2.plants('Bob')).toEqual([ - 'violets', - 'clover', - 'radishes', - 'violets', - ]); - expect(garden1.plants('Charlie')).toEqual([ - 'grass', - 'violets', - 'clover', - 'grass', - ]); - expect(garden2.plants('Charlie')).toEqual([ - 'radishes', - 'radishes', - 'grass', - 'clover', - ]); - }); + xtest("for Larry, last student's garden", () => { + expect(garden.plants('Larry')).toEqual([ + 'grass', + 'violets', + 'clover', + 'violets', + ]); + }); +}); + +describe('disordered class', () => { + const diagram = 'VCRRGVRG\nRVGCCGCV'; + const students = ['Samantha', 'Patricia', 'Xander', 'Roger']; + const garden = new Garden(diagram, students); + + xtest('for Patricia', () => { + expect(garden.plants('Patricia')).toEqual([ + 'violets', + 'clover', + 'radishes', + 'violets', + ]); + }); + + xtest('for Roger', () => { + expect(garden.plants('Roger')).toEqual([ + 'radishes', + 'radishes', + 'grass', + 'clover', + ]); + }); + + xtest('for Samantha', () => { + expect(garden.plants('Samantha')).toEqual([ + 'grass', + 'violets', + 'clover', + 'grass', + ]); + }); + + xtest('for Xander', () => { + expect(garden.plants('Xander')).toEqual([ + 'radishes', + 'grass', + 'clover', + 'violets', + ]); + }); +}); + +describe('Two gardens, different students', () => { + const diagram = 'VCRRGVRG\nRVGCCGCV'; + const garden1 = new Garden(diagram, ['Alice', 'Bob', 'Charlie', 'Dan']); + const garden2 = new Garden(diagram, ['Bob', 'Charlie', 'Dan', 'Erin']); + + xtest('Bob and Charlie for each garden', () => { + expect(garden1.plants('Bob')).toEqual([ + 'radishes', + 'radishes', + 'grass', + 'clover', + ]); + expect(garden2.plants('Bob')).toEqual([ + 'violets', + 'clover', + 'radishes', + 'violets', + ]); + expect(garden1.plants('Charlie')).toEqual([ + 'grass', + 'violets', + 'clover', + 'grass', + ]); + expect(garden2.plants('Charlie')).toEqual([ + 'radishes', + 'radishes', + 'grass', + 'clover', + ]); }); }); From f0224939910c4836dee4f56e5aa1f9edb88bf03f Mon Sep 17 00:00:00 2001 From: Jagdish Prajapati Date: Sun, 29 Jun 2025 19:10:25 +0530 Subject: [PATCH 5/5] Update config.json --- exercises/practice/kindergarten-garden/.meta/config.json | 1 - 1 file changed, 1 deletion(-) diff --git a/exercises/practice/kindergarten-garden/.meta/config.json b/exercises/practice/kindergarten-garden/.meta/config.json index b42ea82a55..a5f555ad04 100644 --- a/exercises/practice/kindergarten-garden/.meta/config.json +++ b/exercises/practice/kindergarten-garden/.meta/config.json @@ -4,7 +4,6 @@ ], "contributors": [ "brendanmckeown", - "jagdish-15", "matthewmorgan", "ryanplusplus", "SleeplessByte",