Skip to content

Commit fa6e105

Browse files
authored
Replace Jest with Mocha+Chai+Sinon, fix tests (#98)
1 parent afe6e95 commit fa6e105

File tree

22 files changed

+953
-610
lines changed

22 files changed

+953
-610
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
dist
2-
node_modules
1+
/.nyc_output/
2+
/coverage/
3+
/dist/
4+
/node_modules/

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@
44
"description": "An open source collection and playground of algorithms, data structures and related documentation to brush up your knowledge of computer science fundamentals, or learn it from scratch.",
55
"type": "module",
66
"scripts": {
7-
"clean": "rm -rf dist",
8-
"build": "pnpm clean && tsc",
9-
"watch": "pnpm clean && tsc --watch"
7+
"clean": "rm -rf .nyc_output coverage dist",
8+
"test": "nyc mocha 'src/**/*.test.ts' --require=tsx",
9+
"coverage": "nyc report --reporter html && open coverage/index.html",
10+
"coverage:check": "nyc check-coverage --lines 90 --branches 80 --statements 90"
1011
},
1112
"packageManager": "pnpm@10.12.1",
1213
"devDependencies": {
14+
"@types/chai": "^5.2.2",
15+
"@types/mocha": "^10.0.10",
16+
"@types/sinon": "^17.0.4",
17+
"chai": "^5.2.1",
1318
"mocha": "^11.7.1",
1419
"nyc": "^17.1.0",
1520
"sinon": "^21.0.0",
21+
"tsx": "^4.20.3",
1622
"typescript": "^5.8.3"
1723
},
1824
"repository": {

0 commit comments

Comments
 (0)