-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
2,049 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Client Unit Tests | ||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/testing-client-unit-tests.yml' | ||
- 'package.json' | ||
- 'client/**' | ||
workflow_dispatch: | ||
defaults: | ||
run: | ||
working-directory: client | ||
jobs: | ||
client-unit-tests: | ||
name: Client Unit Tests | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Node setup | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: 'client/.nvmrc' | ||
|
||
- name: Install dependendencies | ||
run: corepack enable yarn && yarn install | ||
|
||
- name: Run unit tests | ||
run: yarn 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 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,7 @@ | ||
import { expect } from 'vitest'; | ||
|
||
describe('delete me test', () => { | ||
test('run sample test', () => { | ||
expect(1).toBe(1); | ||
}); | ||
}); |
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,29 @@ | ||
import path from 'path'; | ||
|
||
import react from '@vitejs/plugin-react'; | ||
import { defineConfig } from 'vitest/config'; | ||
|
||
export default defineConfig({ | ||
plugins: [react()], | ||
test: { | ||
setupFiles: ['./vitest.setup.ts'], | ||
globals: true, | ||
environment: 'jsdom', | ||
clearMocks: true, | ||
coverage: { | ||
provider: 'v8', | ||
}, | ||
}, | ||
resolve: { | ||
alias: { | ||
'@': path.resolve(__dirname, './src'), | ||
lib: path.resolve(__dirname, './src/lib'), | ||
components: path.resolve(__dirname, './src/components'), | ||
store: path.resolve(__dirname, './src/store'), | ||
services: path.resolve(__dirname, './src/services'), | ||
utils: path.resolve(__dirname, './src/utils'), | ||
hooks: path.resolve(__dirname, './src/hooks'), | ||
containers: path.resolve(__dirname, './src/containers'), | ||
}, | ||
}, | ||
}); |
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 @@ | ||
import '@testing-library/jest-dom'; |
Oops, something went wrong.