Skip to content

Commit e5caeaa

Browse files
authored
Provide more helpful test output (#1522)
[no important files changed]
1 parent bd55d5c commit e5caeaa

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

exercises/practice/dnd-character/dnd-character.test.ts

+25-1
Original file line numberDiff line numberDiff line change
@@ -76,27 +76,51 @@ describe('Ability generator', () => {
7676
})
7777

7878
describe('Character creation', () => {
79-
xit('Random character is valid', () => {
79+
xit('Random character is valid - hitpoints', () => {
8080
const character = new DnDCharacter()
8181

8282
expect(character.hitpoints).toEqual(
8383
10 + DnDCharacter.getModifierFor(character.constitution)
8484
)
85+
})
86+
87+
xit('Random character is valid - strength', () => {
88+
const character = new DnDCharacter()
8589

8690
expect(character.strength).toBeGreaterThanOrEqual(3)
8791
expect(character.strength).toBeLessThanOrEqual(18)
92+
})
93+
94+
xit('Random character is valid - dexterity', () => {
95+
const character = new DnDCharacter()
8896

8997
expect(character.dexterity).toBeGreaterThanOrEqual(3)
9098
expect(character.dexterity).toBeLessThanOrEqual(18)
99+
})
100+
101+
xit('Random character is valid - constitution', () => {
102+
const character = new DnDCharacter()
91103

92104
expect(character.constitution).toBeGreaterThanOrEqual(3)
93105
expect(character.constitution).toBeLessThanOrEqual(18)
106+
})
107+
108+
xit('Random character is valid - intelligence', () => {
109+
const character = new DnDCharacter()
94110

95111
expect(character.intelligence).toBeGreaterThanOrEqual(3)
96112
expect(character.intelligence).toBeLessThanOrEqual(18)
113+
})
114+
115+
xit('Random character is valid - wisdom', () => {
116+
const character = new DnDCharacter()
97117

98118
expect(character.wisdom).toBeGreaterThanOrEqual(3)
99119
expect(character.wisdom).toBeLessThanOrEqual(18)
120+
})
121+
122+
xit('Random character is valid - charisma', () => {
123+
const character = new DnDCharacter()
100124

101125
expect(character.charisma).toBeGreaterThanOrEqual(3)
102126
expect(character.charisma).toBeLessThanOrEqual(18)

0 commit comments

Comments
 (0)