-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bug with boost dice. add unit tests.
- Loading branch information
Showing
3 changed files
with
225 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { | ||
roll, | ||
createSkillCheck, | ||
createCombatCheck, | ||
createOpposedCheck, | ||
createDifficultyPool, | ||
DicePool, | ||
} from "../src/index"; | ||
|
||
describe("Index exports", () => { | ||
test("roll function is exported and working", () => { | ||
const pool: DicePool = { abilityDice: 1 }; | ||
const result = roll(pool); | ||
expect(result).toBeDefined(); | ||
expect(result.results).toBeDefined(); | ||
expect(result.summary).toBeDefined(); | ||
}); | ||
|
||
test("pool creation functions are exported and working", () => { | ||
expect(createSkillCheck(1, 1)).toBeDefined(); | ||
expect(createCombatCheck(1, 1, 1)).toBeDefined(); | ||
expect(createOpposedCheck(1, 1, 1, 1)).toBeDefined(); | ||
expect(createDifficultyPool(1, 1)).toBeDefined(); | ||
}); | ||
}); |