-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(test): migrate from jest to vitest (#3741)
feat(form): migrate form test feat(form): migrate form test fix(eslint): remove async error
- Loading branch information
Showing
302 changed files
with
136,019 additions
and
104,193 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 |
---|---|---|
|
@@ -6,3 +6,5 @@ storybook-static | |
public/ | ||
out/ | ||
examples/ | ||
.vitest/ | ||
coverage/ |
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
lint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 # v4.1.4 | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
|
@@ -43,7 +43,7 @@ jobs: | |
matrix: | ||
node: ['20'] | ||
steps: | ||
- uses: actions/checkout@v4 # v4.1.4 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '0' | ||
- uses: pnpm/[email protected] | ||
|
@@ -62,22 +62,22 @@ jobs: | |
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: true | ||
|
||
accessibility: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 # v4.1.4 | ||
with: | ||
fetch-depth: '0' | ||
- uses: pnpm/action-setup@v4.0.0 | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- run: pnpm run build | ||
- run: pnpm install | ||
- run: pnpm run test:a11y | ||
# accessibility: | ||
# runs-on: ubuntu-22.04 | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: '0' | ||
# - uses: pnpm/action-setup@v3.0.0 | ||
# - name: Use Node.js | ||
# uses: actions/[email protected] | ||
# with: | ||
# node-version: 20 | ||
# cache: 'pnpm' | ||
# - run: pnpm install | ||
# - run: pnpm run build | ||
# - run: pnpm install | ||
# - run: pnpm run test:a11y | ||
build: | ||
strategy: | ||
matrix: | ||
|
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,30 +1,33 @@ | ||
import type { Config } from '@jest/types' | ||
import * as path from 'path' | ||
/** | ||
* TODO: Remove when apply new configuration of a11y | ||
*/ | ||
// import type { Config } from '@jest/types' | ||
// import * as path from 'path' | ||
|
||
const config: Config.InitialOptions = { | ||
rootDir: path.join(__dirname, '..'), | ||
testEnvironment: 'jsdom', | ||
coverageReporters: ['text', 'cobertura'], | ||
reporters: [ | ||
'default', | ||
[ | ||
'jest-junit', | ||
{ | ||
outputDirectory: '.reports', | ||
outputName: 'tests.xml', | ||
}, | ||
], | ||
], | ||
transformIgnorePatterns: ['node_modules/(?!@scaleway)/'], | ||
testPathIgnorePatterns: ['/nodes_modules/', 'src/components'], | ||
moduleNameMapper: { | ||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': | ||
'<rootDir>/.jest/fileMock.ts', | ||
'\\.(css|less)$': 'identity-obj-proxy', | ||
'\\.(css\\?inline)$': 'identity-obj-proxy', | ||
}, | ||
setupFilesAfterEnv: ['@testing-library/jest-dom'], | ||
testMatch: ['**/a11y.test.tsx'], | ||
} | ||
// const config: Config.InitialOptions = { | ||
// rootDir: path.join(__dirname, '..'), | ||
// testEnvironment: 'jsdom', | ||
// coverageReporters: ['text', 'cobertura'], | ||
// reporters: [ | ||
// 'default', | ||
// [ | ||
// 'jest-junit', | ||
// { | ||
// outputDirectory: '.reports', | ||
// outputName: 'tests.xml', | ||
// }, | ||
// ], | ||
// ], | ||
// transformIgnorePatterns: ['node_modules/(?!@scaleway)/'], | ||
// testPathIgnorePatterns: ['/nodes_modules/', 'src/components'], | ||
// moduleNameMapper: { | ||
// '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': | ||
// '<rootDir>/.jest/fileMock.ts', | ||
// '\\.(css|less)$': 'identity-obj-proxy', | ||
// '\\.(css\\?inline)$': 'identity-obj-proxy', | ||
// }, | ||
// setupFilesAfterEnv: ['@testing-library/jest-dom'], | ||
// testMatch: ['**/a11y.test.tsx'], | ||
// } | ||
|
||
export default config | ||
// export default config |
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 @@ | ||
export default 'test-file-stub' |
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,2 @@ | ||
export default 'SvgrURL' | ||
export const ReactComponent = 'div' |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.