Skip to content

Commit 57c712f

Browse files
authored
Improve test output of dnd-character (exercism#2470)
[no important files changed] * Don't fiddle with upstream files * Provide more helpful test output
1 parent 481dcfe commit 57c712f

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/.github/labels.yml
22
/.github/workflows/sync-labels.yml
3+
/.github/workflows/no-important-files-changed.yml
34
exercises/**/README.md
45
!/README.md
56

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

+25-2
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,44 @@ describe('D&D Character', () => {
8484
expect(Character.rollAbility()).toBeGreaterThanOrEqual(3);
8585
});
8686

87-
xtest('random character is valid', () => {
87+
xtest('random character is valid - strength', () => {
8888
const Drizzt = new Character();
89-
9089
expect(Drizzt.strength).toBeLessThanOrEqual(18);
9190
expect(Drizzt.strength).toBeGreaterThanOrEqual(3);
91+
});
92+
93+
xtest('random character is valid - dexterity', () => {
94+
const Drizzt = new Character();
9295
expect(Drizzt.dexterity).toBeLessThanOrEqual(18);
9396
expect(Drizzt.dexterity).toBeGreaterThanOrEqual(3);
97+
});
98+
99+
xtest('random character is valid - constitution', () => {
100+
const Drizzt = new Character();
94101
expect(Drizzt.constitution).toBeLessThanOrEqual(18);
95102
expect(Drizzt.constitution).toBeGreaterThanOrEqual(3);
103+
});
104+
105+
xtest('random character is valid - intelligence', () => {
106+
const Drizzt = new Character();
96107
expect(Drizzt.intelligence).toBeLessThanOrEqual(18);
97108
expect(Drizzt.intelligence).toBeGreaterThanOrEqual(3);
109+
});
110+
111+
xtest('random character is valid - wisdom', () => {
112+
const Drizzt = new Character();
98113
expect(Drizzt.wisdom).toBeLessThanOrEqual(18);
99114
expect(Drizzt.wisdom).toBeGreaterThanOrEqual(3);
115+
});
116+
117+
xtest('random character is valid - charisma', () => {
118+
const Drizzt = new Character();
100119
expect(Drizzt.charisma).toBeLessThanOrEqual(18);
101120
expect(Drizzt.charisma).toBeGreaterThanOrEqual(3);
121+
});
122+
123+
xtest('random character is valid - hitpoints', () => {
124+
const Drizzt = new Character();
102125
expect(Drizzt.hitpoints).toEqual(10 + abilityModifier(Drizzt.constitution));
103126
});
104127

0 commit comments

Comments
 (0)