test: add Vitest + 30 dice-engine tests
- Install vitest and @vitest/coverage-v8 - Add test scripts to package.json - Create vitest.config.ts - Add 30 comprehensive tests for parseDiceNotation, rollDice, rollAdvantage, buildNotation, isAdvancedNotation - Fix isAdvancedNotation regex to detect ro (reroll once)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'node',
|
||||
include: ['src/**/*.test.ts'],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user