Commit dda5d2f8 authored by Lucas BRETTES's avatar Lucas BRETTES

chore: switch to jest for testing

parent 5aa6814d
module.exports = {
"roots": [
"<rootDir>/test"
],
"testMatch": [
"**/__tests__/**/*.+(ts|tsx|js)",
"**/?(*.)+(spec|test).+(ts|tsx|js)"
],
"transform": {
"^.+\\.(ts|tsx)$": "ts-jest"
},
}
\ No newline at end of file
This diff is collapsed.
......@@ -11,15 +11,15 @@
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@types/mocha": "^5.2.0",
"@types/jest": "^26.0.24",
"husky": "^7.0.1",
"mocha": "^8.2.1",
"ts-node": "^6.0.5",
"typescript": "^2.8.3"
"jest": "^27.0.6",
"ts-jest": "^27.0.3",
"typescript": "^4.3.5"
},
"scripts": {
"test": "mocha --require ts-node/register/transpile-only 'test/**/*.ts'",
"watch": "mocha --require ts-node/register --watch --watch-files src, test/**/*.ts"
"test": "jest",
"watch": "jest --watch --verbose"
},
"private": true
}
import assert from 'assert';
import Yatzy from '../src/Yatzy';
describe('Chance', () => {
it('scores sum of all dice', () => {
assert.strictEqual(15, Yatzy.chance(2, 3, 4, 5, 1));
......
......@@ -7,7 +7,7 @@
"rootDir": ".",
"strict": true,
"noUnusedLocals": true,
"types": ["node", "mocha"],
"types": ["node", "jest"],
"allowSyntheticDefaultImports": true,
"esModuleInterop": true
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment