Skip to content

Commit

Permalink
Replace Jest with Vitest 2 (#4728)
Browse files Browse the repository at this point in the history
  • Loading branch information
birkskyum authored Nov 22, 2024
1 parent 6e95858 commit 3f1686e
Show file tree
Hide file tree
Showing 186 changed files with 4,286 additions and 5,281 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
files: ${{ github.workspace }}/coverage/jest/codecov.json
files: ${{ github.workspace }}/coverage/vitest/unit/coverage-final.json
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
if: '!cancelled()'
uses: codecov/codecov-action@v5
with:
files: ${{ github.workspace }}/coverage/jest/codecov.json
files: ${{ github.workspace }}/coverage/vitest/integration/coverage-final.json
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
Expand Down
5 changes: 2 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@
},
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"jest.jestCommandLine": "jest",
}
}
}
23 changes: 3 additions & 20 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import stylisticTs from '@stylistic/eslint-plugin-ts'
import tsdoc from 'eslint-plugin-tsdoc';
import jest from 'eslint-plugin-jest';
import vitest from 'eslint-plugin-vitest';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import react from 'eslint-plugin-react';
Expand All @@ -18,7 +18,7 @@ export default [
'@typescript-eslint': typescriptEslint,
'@stylistic': stylisticTs,
tsdoc,
jest,
vitest,
},

linterOptions: {
Expand Down Expand Up @@ -101,23 +101,7 @@ export default [
max: 1,
}],

'tsdoc/syntax': 'warn',
'jest/no-commented-out-tests': 'error',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/prefer-to-contain': 'warn',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
'jest/prefer-to-be': 'warn',
'jest/no-alias-methods': 'warn',
'jest/no-interpolation-in-snapshots': 'warn',

'jest/no-large-snapshots': ['warn', {
maxSize: 50,
inlineMaxSize: 20,
}],

'jest/no-deprecated-functions': 'warn',
'tsdoc/syntax': 'warn'
},
},
{
Expand Down Expand Up @@ -155,5 +139,4 @@ export default [
},
},
},

];
67 changes: 0 additions & 67 deletions jest.config.ts

This file was deleted.

Loading

0 comments on commit 3f1686e

Please sign in to comment.