Skip to content

Commit

Permalink
Migrate jest to vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-auror committed Sep 11, 2024
1 parent 9a1e626 commit dde662f
Show file tree
Hide file tree
Showing 8 changed files with 792 additions and 1,923 deletions.
7 changes: 3 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"plugins": ["jest", "@typescript-eslint"],
"plugins": ["@typescript-eslint"],
"extends": ["plugin:github/internal"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand Down Expand Up @@ -47,7 +47,6 @@
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
"es6": true
}
}
}
35 changes: 0 additions & 35 deletions .vscode/launch.json

This file was deleted.

2 changes: 2 additions & 0 deletions __tests__/csv-escape.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {describe, expect, test} from 'vitest'

import {csvEscape} from '../src/list-format/csv-escape'

describe('csvEscape() backslash escapes every character except subset of definitely safe characters', () => {
Expand Down
2 changes: 2 additions & 0 deletions __tests__/filter.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {describe, expect, test} from 'vitest'

import {Filter} from '../src/filter'
import {File, ChangeStatus} from '../src/file'

Expand Down
2 changes: 2 additions & 0 deletions __tests__/git.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {describe, expect, test} from 'vitest'

import * as git from '../src/git'
import {ChangeStatus} from '../src/file'

Expand Down
2 changes: 2 additions & 0 deletions __tests__/shell-escape.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {describe, expect, test} from 'vitest'

import {backslashEscape, shellEscape} from '../src/list-format/shell-escape'

describe('escape() backslash escapes every character except subset of definitely safe characters', () => {
Expand Down
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"format-check": "prettier --check **/*.ts",
"lint": "eslint src/**/*.ts",
"pack": "ncc build -m",
"test": "jest",
"test": "vitest",
"all": "pnpm run build && pnpm run format && pnpm run lint && pnpm run pack && pnpm test"
},
"repository": {
Expand All @@ -35,7 +35,6 @@
"devDependencies": {
"@octokit/webhooks-types": "^7.3.1",
"@tsconfig/node20": "^20.1.2",
"@types/jest": "^29.5.11",
"@types/js-yaml": "^4.0.9",
"@types/micromatch": "^4.0.2",
"@types/node": "^20.0.0",
Expand All @@ -44,12 +43,9 @@
"@vercel/ncc": "^0.38.1",
"eslint": "^8.56.0",
"eslint-plugin-github": "^4.10.1",
"eslint-plugin-jest": "^27.6.3",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"prettier": "^3.2.4",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"vitest": "^2.0.5"
},
"volta": {
"node": "20.17.0",
Expand Down
Loading

0 comments on commit dde662f

Please sign in to comment.