Skip to content

Commit

Permalink
Run tests with vitest (#1845)
Browse files Browse the repository at this point in the history
  • Loading branch information
fb55 authored Jun 26, 2024
1 parent effdc17 commit aa0c781
Show file tree
Hide file tree
Showing 20 changed files with 2,826 additions and 6,669 deletions.
27 changes: 23 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,23 @@
"curly": [2, "multi-line"],
"no-else-return": 2,

"unicorn/prefer-module": 0,
"unicorn/filename-case": 0,
"n/no-unpublished-import": 0,

"unicorn/filename-case": [
2,
{
"cases": {
"camelCase": true,
"pascalCase": true
}
}
],
"unicorn/no-null": 0,
"unicorn/prefer-code-point": 0,
"unicorn/prefer-string-slice": 0,
"unicorn/prefer-add-event-listener": 0
"unicorn/prefer-add-event-listener": 0,
"unicorn/prefer-at": 0,
"unicorn/prefer-string-replace-all": 0
},
"overrides": [
{
Expand All @@ -45,9 +56,11 @@
],
"parserOptions": {
"sourceType": "module",
"project": "./tsconfig.eslint.json"
"project": "./tsconfig.json"
},
"rules": {
"curly": [2, "multi-line"],

"@typescript-eslint/prefer-for-of": 0,
"@typescript-eslint/member-ordering": 0,
"@typescript-eslint/explicit-function-return-type": 0,
Expand Down Expand Up @@ -77,6 +90,12 @@
"n/no-missing-import": 0,
"n/no-unsupported-features/es-syntax": 0
}
},
{
"files": "*.spec.ts",
"rules": {
"n/no-unsupported-features/node-builtins": 0
}
}
]
}
12 changes: 6 additions & 6 deletions .github/workflows/nodejs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
fail-fast: false
matrix:
node:
- 14
- 16
- 18
- 20
- 22
- lts/*

steps:
Expand All @@ -53,12 +53,12 @@ jobs:
- run: npm ci
- run: npm run build --if-present

- name: Run Jest
run: npm run test:jest
- name: Run tests
run: npm run test:vi
if: matrix.node != env.NODE_COV

- name: Run Jest with coverage
run: npm run test:jest -- --coverage
- name: Run tests with coverage
run: npm run test:vi -- --coverage
if: matrix.node == env.NODE_COV

- name: Run Coveralls
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
coverage/
lib/
dist/
.tshy/
3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

Loading

0 comments on commit aa0c781

Please sign in to comment.