Skip to content

Commit b4272be

Browse files
authored
test(replay): Switch to using vitest for replay worker (#12961)
Before: `Time: 0.303 s` After: `Duration 271ms (transform 28ms, setup 0ms, collect 26ms, tests 3ms, environment 0ms, prepare 68ms)`
1 parent 80d76c9 commit b4272be

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

packages/replay-worker/jest.config.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/replay-worker/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"clean": "rimraf build",
3333
"fix": "eslint . --format stylish --fix",
3434
"lint": "eslint . --format stylish",
35-
"test": "jest",
36-
"test:watch": "jest --watch"
35+
"test": "vitest run",
36+
"test:watch": "vitest --watch"
3737
},
3838
"repository": {
3939
"type": "git",

packages/replay-worker/test/unit/Compressor.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { describe, expect, it } from 'vitest';
2+
13
import { decompressSync, strFromU8 } from 'fflate';
24

35
import { Compressor } from '../../src/Compressor';
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "./tsconfig.json",
3-
"include": ["test/**/*.ts"],
3+
"include": ["test/**/*.ts", "vite.config.ts"],
44
"compilerOptions": {
5-
"types": ["node", "jest"]
5+
"types": ["node"]
66
}
77
}

packages/replay-worker/vite.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import baseConfig from '../../vite/vite.config';
2+
3+
export default {
4+
...baseConfig,
5+
};

0 commit comments

Comments
 (0)