Skip to content

Commit

Permalink
chore: fix test config (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyletsang authored Nov 7, 2024
1 parent 20c9be2 commit 69413ac
Show file tree
Hide file tree
Showing 7 changed files with 642 additions and 210 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
run: yarn playwright install --with-deps

- name: Run Tests
run: yarn test --browser.name=${{ env.BROWSER }} --browser.headless
run: yarn testonly --browser.name=${{ env.BROWSER }} --browser.headless --coverage
env:
BROWSER: ${{ matrix.browser }}

- name: Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4

- name: Build Project
run: yarn build
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"start": "yarn --cwd www start",
"tdd": "vitest",
"test": "yarn lint && yarn testonly",
"testonly": "yarn vitest --run"
"testonly": "vitest --run"
},
"lint-staged": {
"*.js,*.tsx": "eslint --fix --ext .js,.ts,.tsx"
Expand Down Expand Up @@ -108,8 +108,9 @@
"@types/react-transition-group": "^4.4.4",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/browser": "^2.0.2",
"@vitejs/plugin-react": "^4.3.2",
"@vitest/browser": "^2.1.3",
"@vitest/coverage-istanbul": "2.1.3",
"babel-eslint": "^10.1.0",
"babel-plugin-istanbul": "^6.1.1",
"babel-preset-env-modules": "^1.0.1",
Expand All @@ -126,17 +127,18 @@
"gh-pages": "^3.1.0",
"hookem": "^1.0.9",
"lint-staged": "^10.5.4",
"playwright": "^1.45.1",
"playwright": "^1.48.0",
"prettier": "^2.7.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-transition-group": "^4.4.1",
"rimraf": "^3.0.2",
"rollup": "^4.18.1",
"typescript": "^4.7.4",
"vitest": "^2.0.2"
"vitest": "^2.1.3"
},
"bugs": {
"url": "https://github.com/react-restart/ui/issues"
}
},
"packageManager": "[email protected]+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
}
Empty file removed test/ambient.d.ts
Empty file.
9 changes: 0 additions & 9 deletions vitest-example/HelloWorld.test.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions vitest-example/HelloWorld.tsx

This file was deleted.

6 changes: 5 additions & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from 'vitest/config';
import { coverageConfigDefaults, defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';

export default defineConfig({
Expand All @@ -13,5 +13,9 @@ export default defineConfig({
// https://playwright.dev
providerOptions: {},
},
coverage: {
provider: 'istanbul',
exclude: [...coverageConfigDefaults.exclude, 'www/**', '**/*.js'],
},
},
});
Loading

0 comments on commit 69413ac

Please sign in to comment.