Skip to content

Commit c14a4f6

Browse files
authored
Updating tests for dnd-character (#2588)
1 parent 9d889e3 commit c14a4f6

File tree

3 files changed

+37
-20
lines changed

3 files changed

+37
-20
lines changed

exercises/practice/dnd-character/.meta/config.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"contributors": [
66
"ankorGH",
77
"hayashi-ay",
8+
"jagdish-15",
89
"SleeplessByte"
910
],
1011
"files": {
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,61 @@
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
[1e9ae1dc-35bd-43ba-aa08-e4b94c20fa37]
6-
description = "ability modifier for score 3 is -4"
13+
description = "ability modifier -> ability modifier for score 3 is -4"
714

815
[cc9bb24e-56b8-4e9e-989d-a0d1a29ebb9c]
9-
description = "ability modifier for score 4 is -3"
16+
description = "ability modifier -> ability modifier for score 4 is -3"
1017

1118
[5b519fcd-6946-41ee-91fe-34b4f9808326]
12-
description = "ability modifier for score 5 is -3"
19+
description = "ability modifier -> ability modifier for score 5 is -3"
1320

1421
[dc2913bd-6d7a-402e-b1e2-6d568b1cbe21]
15-
description = "ability modifier for score 6 is -2"
22+
description = "ability modifier -> ability modifier for score 6 is -2"
1623

1724
[099440f5-0d66-4b1a-8a10-8f3a03cc499f]
18-
description = "ability modifier for score 7 is -2"
25+
description = "ability modifier -> ability modifier for score 7 is -2"
1926

2027
[cfda6e5c-3489-42f0-b22b-4acb47084df0]
21-
description = "ability modifier for score 8 is -1"
28+
description = "ability modifier -> ability modifier for score 8 is -1"
2229

2330
[c70f0507-fa7e-4228-8463-858bfbba1754]
24-
description = "ability modifier for score 9 is -1"
31+
description = "ability modifier -> ability modifier for score 9 is -1"
2532

2633
[6f4e6c88-1cd9-46a0-92b8-db4a99b372f7]
27-
description = "ability modifier for score 10 is 0"
34+
description = "ability modifier -> ability modifier for score 10 is 0"
2835

2936
[e00d9e5c-63c8-413f-879d-cd9be9697097]
30-
description = "ability modifier for score 11 is 0"
37+
description = "ability modifier -> ability modifier for score 11 is 0"
3138

3239
[eea06f3c-8de0-45e7-9d9d-b8cab4179715]
33-
description = "ability modifier for score 12 is +1"
40+
description = "ability modifier -> ability modifier for score 12 is +1"
3441

3542
[9c51f6be-db72-4af7-92ac-b293a02c0dcd]
36-
description = "ability modifier for score 13 is +1"
43+
description = "ability modifier -> ability modifier for score 13 is +1"
3744

3845
[94053a5d-53b6-4efc-b669-a8b5098f7762]
39-
description = "ability modifier for score 14 is +2"
46+
description = "ability modifier -> ability modifier for score 14 is +2"
4047

4148
[8c33e7ca-3f9f-4820-8ab3-65f2c9e2f0e2]
42-
description = "ability modifier for score 15 is +2"
49+
description = "ability modifier -> ability modifier for score 15 is +2"
4350

4451
[c3ec871e-1791-44d0-b3cc-77e5fb4cd33d]
45-
description = "ability modifier for score 16 is +3"
52+
description = "ability modifier -> ability modifier for score 16 is +3"
4653

4754
[3d053cee-2888-4616-b9fd-602a3b1efff4]
48-
description = "ability modifier for score 17 is +3"
55+
description = "ability modifier -> ability modifier for score 17 is +3"
4956

5057
[bafd997a-e852-4e56-9f65-14b60261faee]
51-
description = "ability modifier for score 18 is +4"
58+
description = "ability modifier -> ability modifier for score 18 is +4"
5259

5360
[4f28f19c-2e47-4453-a46a-c0d365259c14]
5461
description = "random ability is within range"
@@ -58,3 +65,8 @@ description = "random character is valid"
5865

5966
[2ca77b9b-c099-46c3-a02c-0d0f68ffa0fe]
6067
description = "each ability is only calculated once"
68+
include = false
69+
70+
[dca2b2ec-f729-4551-84b9-078876bb4808]
71+
description = "each ability is only calculated once"
72+
reimplements = "2ca77b9b-c099-46c3-a02c-0d0f68ffa0fe"

exercises/practice/dnd-character/dnd-character.spec.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ describe('D&D Character', () => {
128128

129129
xtest('each ability is only calculated once', () => {
130130
const Drizzt = new Character();
131-
132131
expect(Drizzt.strength).toEqual(Drizzt.strength);
132+
expect(Drizzt.dexterity).toEqual(Drizzt.dexterity);
133+
expect(Drizzt.constitution).toEqual(Drizzt.constitution);
134+
expect(Drizzt.intelligence).toEqual(Drizzt.intelligence);
135+
expect(Drizzt.wisdom).toEqual(Drizzt.wisdom);
136+
expect(Drizzt.charisma).toEqual(Drizzt.charisma);
133137
});
134138
});

0 commit comments

Comments
 (0)