Migrate from Jest to node:test (#115)
This commit is contained in:
parent
d33f80cca6
commit
0ff3bb5967
24 changed files with 759 additions and 6421 deletions
|
|
@ -1,3 +0,0 @@
|
|||
module.exports = {
|
||||
preset: "ts-jest"
|
||||
};
|
||||
|
|
@ -8,17 +8,18 @@
|
|||
"scripts": {
|
||||
"dev": "webpack watch --mode development",
|
||||
"build": "webpack --mode production",
|
||||
"test": "jest"
|
||||
"test": "tsx --test src/**/*.test.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.15.30",
|
||||
"bufferutil": "^4.0.9",
|
||||
"sync-client": "file:../sync-client",
|
||||
"ts-loader": "^9.5.2",
|
||||
"tslib": "2.8.1",
|
||||
"tsx": "^4.20.5",
|
||||
"typescript": "5.8.3",
|
||||
"uuid": "^11.1.0",
|
||||
"webpack": "^5.99.9",
|
||||
"webpack-cli": "^6.0.1",
|
||||
"bufferutil": "^4.0.9"
|
||||
"webpack-cli": "^6.0.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import { describe, it } from "node:test";
|
||||
import assert from "node:assert";
|
||||
import { randomCasing } from "./random-casing";
|
||||
|
||||
describe("randomCasing", () => {
|
||||
|
|
@ -5,7 +7,7 @@ describe("randomCasing", () => {
|
|||
const input =
|
||||
"hello, this is a really long string with a lot of characters";
|
||||
const result = randomCasing(input);
|
||||
expect(result.toLowerCase()).toBe(input.toLowerCase());
|
||||
expect(result).not.toBe(input);
|
||||
assert.strictEqual(result.toLowerCase(), input.toLowerCase());
|
||||
assert.notStrictEqual(result, input);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
"esModuleInterop": true,
|
||||
"lib": [
|
||||
"DOM",
|
||||
"ESNext"
|
||||
"ES2024",
|
||||
],
|
||||
"moduleResolution": "node"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue