Skip to content

Commit 981a395

Browse files
committed
Add unit tests for "staying on the same page when switching versions" functionality
This is meant to simplify checking correctness of code like #7227 and fixing bugs like #7226. In fact, I'm hoping to eventually make this code general enough that it runs locally with `mike serve`. Picked `mocha` as the testing library because its Typescript support relies on ts-node, which this project already relies on. See also https://github.com/mochajs/mocha-examples/tree/main/packages/typescript Instead of using `chai`, I'm using Node's assert package. Its TS types are in `@types/node`.
1 parent b04b6ac commit 981a395

File tree

4 files changed

+801
-6
lines changed

4 files changed

+801
-6
lines changed

.mocharc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extension": ["ts"],
3+
"spec": "src/**/**.test.ts",
4+
"require": "ts-node/register"
5+
}

0 commit comments

Comments
 (0)