-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: replaces jest config for vitest * refactor(config): renames composite action.yml
- Loading branch information
1 parent
fc298ff
commit f948c0f
Showing
15 changed files
with
1,538 additions
and
941 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,9 +1,9 @@ | ||
name: 'Jest Test' | ||
description: 'Runs Jest tests' | ||
name: 'Vite Test' | ||
description: 'Runs Vite tests' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Run Jest | ||
- name: Vite Test | ||
run: pnpm run test | ||
shell: bash |
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
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
const SPEC_PREFIX = 'spec'; | ||
const TEST_PREFIX = 'test'; | ||
|
||
module.exports = { | ||
ECMA_VERSION: 2021, | ||
JAVASCRIPT_FILES: ['*.js?(x)', '*.mjs'], | ||
JAVASCRIPT_TEST_FILES: [ | ||
`*.${TEST_PREFIX}.js?(x)`, | ||
`*.${SPEC_PREFIX}.js?(x)`, | ||
`*.${TEST_PREFIX}.mjs?(x)`, | ||
`*.${SPEC_PREFIX}.mjs?(x)`, | ||
], | ||
TYPESCRIPT_FILES: ['*.ts?(x)'], | ||
TYPESCRIPT_TEST_FILES: [`*.${TEST_PREFIX}.ts?(x)`, `*.${SPEC_PREFIX}.ts?(x)`], | ||
}; |
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 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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { expect } from 'vitest'; | ||
import 'vitest-axe/extend-expect'; | ||
import * as matchers from 'vitest-axe/matchers'; | ||
|
||
expect.extend(matchers); |
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,18 @@ | ||
import react from '@vitejs/plugin-react'; | ||
import { defineConfig } from 'vite'; | ||
|
||
// needed this way by vitest | ||
// eslint-disable-next-line import/no-default-export | ||
export default defineConfig({ | ||
plugins: [react()], | ||
test: { | ||
coverage: { | ||
provider: 'c8', | ||
reporter: ['text', 'html'], | ||
}, | ||
css: true, | ||
environment: 'jsdom', | ||
globals: true, | ||
setupFiles: './setup.react.js', | ||
}, | ||
}); |