-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from Banno/switch-to-vitest
chore: convert to vitest from karma
- Loading branch information
Showing
11 changed files
with
1,150 additions
and
900 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,25 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Node.js CI | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
types: [opened, synchronize, ready_for_review] | ||
paths-ignore: | ||
- '**/*.md' | ||
jobs: | ||
build: | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x, 22.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
- name: run tests | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
node-version: '20.x' | ||
- run: yarn install | ||
- run: yarn test | ||
|
||
- run: npx playwright install --with-deps chromium | ||
- run: CI=1 yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
yarn-error.log | ||
*.d.ts | ||
!types/index.d.ts | ||
.vitest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { defineConfig } from 'vite'; | ||
|
||
export default defineConfig((env) => ({ | ||
cacheDir: '.vitest/web-component-router', | ||
build: {}, | ||
optimzeDeps: { | ||
include: ['path-to-regexp'], | ||
}, | ||
test: { | ||
include: ["test/**/*-spec.js"], | ||
browser: { | ||
provider: 'playwright', | ||
enabled: true, | ||
headless: !!process.env.CI, | ||
name: 'chromium', | ||
}, | ||
globals: true, | ||
coverage: { | ||
enabled: false, | ||
all: true, | ||
provider: 'v8', | ||
reporter: ['lcov', 'json', 'json-summary', 'html'], | ||
include: [], | ||
exclude: [], | ||
lines: 80, | ||
branches: 80, | ||
functions: 80, | ||
statements: 80, | ||
}, | ||
}, | ||
})); |
Oops, something went wrong.