Skip to content

Commit

Permalink
test(replay): Switch to using vitest for replay worker (#12961)
Browse files Browse the repository at this point in the history
Before: `Time: 0.303 s`

After: `Duration 271ms (transform 28ms, setup 0ms, collect 26ms, tests
3ms, environment 0ms, prepare 68ms)`
  • Loading branch information
AbhiPrasad authored Jul 17, 2024
1 parent 80d76c9 commit b4272be
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/replay-worker/jest.config.js

This file was deleted.

4 changes: 2 additions & 2 deletions packages/replay-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"clean": "rimraf build",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"test": "jest",
"test:watch": "jest --watch"
"test": "vitest run",
"test:watch": "vitest --watch"
},
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions packages/replay-worker/test/unit/Compressor.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from 'vitest';

import { decompressSync, strFromU8 } from 'fflate';

import { Compressor } from '../../src/Compressor';
Expand Down
4 changes: 2 additions & 2 deletions packages/replay-worker/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"include": ["test/**/*.ts"],
"include": ["test/**/*.ts", "vite.config.ts"],
"compilerOptions": {
"types": ["node", "jest"]
"types": ["node"]
}
}
5 changes: 5 additions & 0 deletions packages/replay-worker/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import baseConfig from '../../vite/vite.config';

export default {
...baseConfig,
};

0 comments on commit b4272be

Please sign in to comment.