Skip to content

Commit d0324d5

Browse files
authored
Updating tests for Allergies (#2568)
* Updating tests for Allergies * Correcting incorrect path leading to linting failure * restoring old style * undoing the fruit-picker path change
1 parent af54b02 commit d0324d5

File tree

3 files changed

+68
-52
lines changed

3 files changed

+68
-52
lines changed

exercises/practice/allergies/.meta/config.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
],
55
"contributors": [
66
"ankorGH",
7+
"jagdish-15",
78
"matthewmorgan",
89
"ovidiu141",
910
"ryanplusplus",
+62-52
Original file line numberDiff line numberDiff line change
@@ -1,150 +1,160 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
411

512
[17fc7296-2440-4ac4-ad7b-d07c321bc5a0]
6-
description = "not allergic to anything"
13+
description = "testing for eggs allergy -> not allergic to anything"
714

815
[07ced27b-1da5-4c2e-8ae2-cb2791437546]
9-
description = "allergic only to eggs"
16+
description = "testing for eggs allergy -> allergic only to eggs"
1017

1118
[5035b954-b6fa-4b9b-a487-dae69d8c5f96]
12-
description = "allergic to eggs and something else"
19+
description = "testing for eggs allergy -> allergic to eggs and something else"
1320

1421
[64a6a83a-5723-4b5b-a896-663307403310]
15-
description = "allergic to something, but not eggs"
22+
description = "testing for eggs allergy -> allergic to something, but not eggs"
1623

1724
[90c8f484-456b-41c4-82ba-2d08d93231c6]
18-
description = "allergic to everything"
25+
description = "testing for eggs allergy -> allergic to everything"
1926

2027
[d266a59a-fccc-413b-ac53-d57cb1f0db9d]
21-
description = "not allergic to anything"
28+
description = "testing for peanuts allergy -> not allergic to anything"
2229

2330
[ea210a98-860d-46b2-a5bf-50d8995b3f2a]
24-
description = "allergic only to peanuts"
31+
description = "testing for peanuts allergy -> allergic only to peanuts"
2532

2633
[eac69ae9-8d14-4291-ac4b-7fd2c73d3a5b]
27-
description = "allergic to peanuts and something else"
34+
description = "testing for peanuts allergy -> allergic to peanuts and something else"
2835

2936
[9152058c-ce39-4b16-9b1d-283ec6d25085]
30-
description = "allergic to something, but not peanuts"
37+
description = "testing for peanuts allergy -> allergic to something, but not peanuts"
3138

3239
[d2d71fd8-63d5-40f9-a627-fbdaf88caeab]
33-
description = "allergic to everything"
40+
description = "testing for peanuts allergy -> allergic to everything"
3441

3542
[b948b0a1-cbf7-4b28-a244-73ff56687c80]
36-
description = "not allergic to anything"
43+
description = "testing for shellfish allergy -> not allergic to anything"
3744

3845
[9ce9a6f3-53e9-4923-85e0-73019047c567]
39-
description = "allergic only to shellfish"
46+
description = "testing for shellfish allergy -> allergic only to shellfish"
4047

4148
[b272fca5-57ba-4b00-bd0c-43a737ab2131]
42-
description = "allergic to shellfish and something else"
49+
description = "testing for shellfish allergy -> allergic to shellfish and something else"
4350

4451
[21ef8e17-c227-494e-8e78-470a1c59c3d8]
45-
description = "allergic to something, but not shellfish"
52+
description = "testing for shellfish allergy -> allergic to something, but not shellfish"
4653

4754
[cc789c19-2b5e-4c67-b146-625dc8cfa34e]
48-
description = "allergic to everything"
55+
description = "testing for shellfish allergy -> allergic to everything"
4956

5057
[651bde0a-2a74-46c4-ab55-02a0906ca2f5]
51-
description = "not allergic to anything"
58+
description = "testing for strawberries allergy -> not allergic to anything"
5259

5360
[b649a750-9703-4f5f-b7f7-91da2c160ece]
54-
description = "allergic only to strawberries"
61+
description = "testing for strawberries allergy -> allergic only to strawberries"
5562

5663
[50f5f8f3-3bac-47e6-8dba-2d94470a4bc6]
57-
description = "allergic to strawberries and something else"
64+
description = "testing for strawberries allergy -> allergic to strawberries and something else"
5865

5966
[23dd6952-88c9-48d7-a7d5-5d0343deb18d]
60-
description = "allergic to something, but not strawberries"
67+
description = "testing for strawberries allergy -> allergic to something, but not strawberries"
6168

6269
[74afaae2-13b6-43a2-837a-286cd42e7d7e]
63-
description = "allergic to everything"
70+
description = "testing for strawberries allergy -> allergic to everything"
6471

6572
[c49a91ef-6252-415e-907e-a9d26ef61723]
66-
description = "not allergic to anything"
73+
description = "testing for tomatoes allergy -> not allergic to anything"
6774

6875
[b69c5131-b7d0-41ad-a32c-e1b2cc632df8]
69-
description = "allergic only to tomatoes"
76+
description = "testing for tomatoes allergy -> allergic only to tomatoes"
7077

7178
[1ca50eb1-f042-4ccf-9050-341521b929ec]
72-
description = "allergic to tomatoes and something else"
79+
description = "testing for tomatoes allergy -> allergic to tomatoes and something else"
7380

7481
[e9846baa-456b-4eff-8025-034b9f77bd8e]
75-
description = "allergic to something, but not tomatoes"
82+
description = "testing for tomatoes allergy -> allergic to something, but not tomatoes"
7683

7784
[b2414f01-f3ad-4965-8391-e65f54dad35f]
78-
description = "allergic to everything"
85+
description = "testing for tomatoes allergy -> allergic to everything"
7986

8087
[978467ab-bda4-49f7-b004-1d011ead947c]
81-
description = "not allergic to anything"
88+
description = "testing for chocolate allergy -> not allergic to anything"
8289

8390
[59cf4e49-06ea-4139-a2c1-d7aad28f8cbc]
84-
description = "allergic only to chocolate"
91+
description = "testing for chocolate allergy -> allergic only to chocolate"
8592

8693
[b0a7c07b-2db7-4f73-a180-565e07040ef1]
87-
description = "allergic to chocolate and something else"
94+
description = "testing for chocolate allergy -> allergic to chocolate and something else"
8895

8996
[f5506893-f1ae-482a-b516-7532ba5ca9d2]
90-
description = "allergic to something, but not chocolate"
97+
description = "testing for chocolate allergy -> allergic to something, but not chocolate"
9198

9299
[02debb3d-d7e2-4376-a26b-3c974b6595c6]
93-
description = "allergic to everything"
100+
description = "testing for chocolate allergy -> allergic to everything"
94101

95102
[17f4a42b-c91e-41b8-8a76-4797886c2d96]
96-
description = "not allergic to anything"
103+
description = "testing for pollen allergy -> not allergic to anything"
97104

98105
[7696eba7-1837-4488-882a-14b7b4e3e399]
99-
description = "allergic only to pollen"
106+
description = "testing for pollen allergy -> allergic only to pollen"
100107

101108
[9a49aec5-fa1f-405d-889e-4dfc420db2b6]
102-
description = "allergic to pollen and something else"
109+
description = "testing for pollen allergy -> allergic to pollen and something else"
103110

104111
[3cb8e79f-d108-4712-b620-aa146b1954a9]
105-
description = "allergic to something, but not pollen"
112+
description = "testing for pollen allergy -> allergic to something, but not pollen"
106113

107114
[1dc3fe57-7c68-4043-9d51-5457128744b2]
108-
description = "allergic to everything"
115+
description = "testing for pollen allergy -> allergic to everything"
109116

110117
[d3f523d6-3d50-419b-a222-d4dfd62ce314]
111-
description = "not allergic to anything"
118+
description = "testing for cats allergy -> not allergic to anything"
112119

113120
[eba541c3-c886-42d3-baef-c048cb7fcd8f]
114-
description = "allergic only to cats"
121+
description = "testing for cats allergy -> allergic only to cats"
115122

116123
[ba718376-26e0-40b7-bbbe-060287637ea5]
117-
description = "allergic to cats and something else"
124+
description = "testing for cats allergy -> allergic to cats and something else"
118125

119126
[3c6dbf4a-5277-436f-8b88-15a206f2d6c4]
120-
description = "allergic to something, but not cats"
127+
description = "testing for cats allergy -> allergic to something, but not cats"
121128

122129
[1faabb05-2b98-4995-9046-d83e4a48a7c1]
123-
description = "allergic to everything"
130+
description = "testing for cats allergy -> allergic to everything"
124131

125132
[f9c1b8e7-7dc5-4887-aa93-cebdcc29dd8f]
126-
description = "no allergies"
133+
description = "list when: -> no allergies"
127134

128135
[9e1a4364-09a6-4d94-990f-541a94a4c1e8]
129-
description = "just eggs"
136+
description = "list when: -> just eggs"
130137

131138
[8851c973-805e-4283-9e01-d0c0da0e4695]
132-
description = "just peanuts"
139+
description = "list when: -> just peanuts"
133140

134141
[2c8943cb-005e-435f-ae11-3e8fb558ea98]
135-
description = "just strawberries"
142+
description = "list when: -> just strawberries"
136143

137144
[6fa95d26-044c-48a9-8a7b-9ee46ec32c5c]
138-
description = "eggs and peanuts"
145+
description = "list when: -> eggs and peanuts"
139146

140147
[19890e22-f63f-4c5c-a9fb-fb6eacddfe8e]
141-
description = "more than eggs but not peanuts"
148+
description = "list when: -> more than eggs but not peanuts"
142149

143150
[4b68f470-067c-44e4-889f-c9fe28917d2f]
144-
description = "lots of stuff"
151+
description = "list when: -> lots of stuff"
145152

146153
[0881b7c5-9efa-4530-91bd-68370d054bc7]
147-
description = "everything"
154+
description = "list when: -> everything"
148155

149156
[12ce86de-b347-42a0-ab7c-2e0570f0c65b]
150-
description = "no allergen score parts"
157+
description = "list when: -> no allergen score parts"
158+
159+
[93c2df3e-4f55-4fed-8116-7513092819cd]
160+
description = "list when: -> no allergen score parts without highest valid score"

exercises/practice/allergies/allergies.spec.js

+5
Original file line numberDiff line numberDiff line change
@@ -285,5 +285,10 @@ describe('Allergies', () => {
285285
'cats',
286286
]);
287287
});
288+
289+
xtest('no allergen score parts without highest valid score', () => {
290+
const allergies = new Allergies(257);
291+
expect(allergies.list()).toEqual(['eggs']);
292+
});
288293
});
289294
});

0 commit comments

Comments
 (0)