Skip to content

Commit 93e5671

Browse files
committed
Jest to vitest
1 parent a88d6ed commit 93e5671

5 files changed

Lines changed: 726 additions & 2129 deletions

File tree

jest.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,24 @@
1414
"@eslint/eslintrc": "^3.1.0",
1515
"@eslint/js": "^9.8.0",
1616
"@types/command-exists": "^1.2.1",
17-
"@types/jest": "^29.2.4",
1817
"@types/node": "^20.5.9",
1918
"@types/split2": "^4.2.0",
2019
"@types/tmp": "^0.2.3",
2120
"@typescript-eslint/eslint-plugin": "^8.0.1",
2221
"@typescript-eslint/parser": "^8.0.1",
2322
"eslint": "^9.8.0",
24-
"jest": "^29.3.1",
2523
"prettier": "^3.0.3",
2624
"rimraf": "^6.0.1",
27-
"ts-jest": "^29.2.4",
28-
"typescript": "^5.5.4"
25+
"typescript": "^5.5.4",
26+
"vitest": "^3.0.1"
2927
},
3028
"scripts": {
31-
"lint": "eslint --report-unused-disable-directives --max-warnings 0 src test",
29+
"lint": "eslint --report-unused-disable-directives --max-warnings 0",
3230
"prebuild": "rimraf dist esm",
3331
"build:esm": "tsc --target es2018 --outDir esm",
3432
"build:es5": "tsc --target es2018 --module commonjs --outDir dist",
3533
"build": "npm run build:esm && npm run build:es5",
36-
"test": "jest",
34+
"test": "vitest",
3735
"preversion": "npm run build",
3836
"postversion": "git push --follow-tags"
3937
},

test/__snapshots__/index.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`test simple 1`] = `
44
"r111111111 kidney,1 leg,2 toenail,3

test/index.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { test, expect } from 'vitest'
12
import { ixIxxStream } from '../src/'
23
import tmp from 'tmp'
34
import fs from 'fs'

0 commit comments

Comments
 (0)