Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: unit tests with jest #158

Merged
merged 5 commits into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
uses: actions/cache/save@v4
with:
path: |
coverage/lcov.info
coverage/chrome/lcov.info
coverage/firefox/lcov.info
key: coverage-${{ github.run_id }}
Expand All @@ -57,6 +58,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: |
coverage/lcov.info
coverage/chrome/lcov.info
coverage/firefox/lcov.info
key: coverage-${{ github.run_id }}
Expand Down
15 changes: 15 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Config } from 'jest'

const config: Config = {
collectCoverage: true,
coverageProvider: 'v8',
coverageReporters: ['lcov', 'text'],
extensionsToTreatAsEsm: ['.ts'],
roots: ['src'],
testEnvironment: 'node',
transform: {
'^.+.tsx?$': ['ts-jest', { useESM: true }],
},
}

export default config
Loading