Skip to content

Commit 746e285

Browse files
committed
Add testing
Signed-off-by: John Molakvoæ <[email protected]>
1 parent 026ef7e commit 746e285

File tree

11 files changed

+21132
-13299
lines changed

11 files changed

+21132
-13299
lines changed

.github/workflows/node.yml

+4
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,7 @@ jobs:
5151
run: |
5252
git status
5353
git --no-pager diff
54+
55+
- name: Testing
56+
run: |
57+
npm run test --if-present

jest.config.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
const esModules = ['p-limit', 'yocto-queue'].join('|')
2+
3+
module.exports = {
4+
preset: 'ts-jest',
5+
moduleFileExtensions: ['js', 'vue', 'ts'],
6+
collectCoverageFrom: [
7+
'src/**/*.{js,vue}',
8+
'!**/node_modules/**',
9+
],
10+
coverageReporters: [
11+
'html',
12+
'text-summary',
13+
],
14+
setupFilesAfterEnv: [
15+
'<rootDir>/tests/setup.js',
16+
],
17+
testEnvironment: 'jsdom',
18+
transform: {
19+
'^.+\\.ts$': 'ts-jest',
20+
'^.+\\.js$': 'babel-jest',
21+
'^.+\\.vue$': '@vue/vue2-jest',
22+
},
23+
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
24+
}

0 commit comments

Comments
 (0)