Skip to content

Commit

Permalink
Provide more helpful test output (#1522)
Browse files Browse the repository at this point in the history
[no important files changed]
  • Loading branch information
mk-mxp authored Aug 2, 2024
1 parent bd55d5c commit e5caeaa
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion exercises/practice/dnd-character/dnd-character.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,51 @@ describe('Ability generator', () => {
})

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

expect(character.hitpoints).toEqual(
10 + DnDCharacter.getModifierFor(character.constitution)
)
})

xit('Random character is valid - strength', () => {
const character = new DnDCharacter()

expect(character.strength).toBeGreaterThanOrEqual(3)
expect(character.strength).toBeLessThanOrEqual(18)
})

xit('Random character is valid - dexterity', () => {
const character = new DnDCharacter()

expect(character.dexterity).toBeGreaterThanOrEqual(3)
expect(character.dexterity).toBeLessThanOrEqual(18)
})

xit('Random character is valid - constitution', () => {
const character = new DnDCharacter()

expect(character.constitution).toBeGreaterThanOrEqual(3)
expect(character.constitution).toBeLessThanOrEqual(18)
})

xit('Random character is valid - intelligence', () => {
const character = new DnDCharacter()

expect(character.intelligence).toBeGreaterThanOrEqual(3)
expect(character.intelligence).toBeLessThanOrEqual(18)
})

xit('Random character is valid - wisdom', () => {
const character = new DnDCharacter()

expect(character.wisdom).toBeGreaterThanOrEqual(3)
expect(character.wisdom).toBeLessThanOrEqual(18)
})

xit('Random character is valid - charisma', () => {
const character = new DnDCharacter()

expect(character.charisma).toBeGreaterThanOrEqual(3)
expect(character.charisma).toBeLessThanOrEqual(18)
Expand Down

0 comments on commit e5caeaa

Please sign in to comment.