diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2022-03-15 16:32:00 +0100 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2022-03-15 17:08:58 +0100 |
commit | 9b82bd312be8dadc3179dd7e3f818fd31c03ba90 (patch) | |
tree | 3b52c0c320d88bf36de51d661e318e40130c10f3 /jest.config.js | |
parent | 026ef7e01b48051d35ef97b018584884b5db9911 (diff) |
Add testing
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'jest.config.js')
-rw-r--r-- | jest.config.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 00000000..8413b5cd --- /dev/null +++ b/jest.config.js @@ -0,0 +1,24 @@ +const esModules = ['p-limit', 'yocto-queue'].join('|') + +module.exports = { + preset: 'ts-jest', + moduleFileExtensions: ['js', 'vue', 'ts'], + collectCoverageFrom: [ + 'src/**/*.{js,vue}', + '!**/node_modules/**', + ], + coverageReporters: [ + 'html', + 'text-summary', + ], + setupFilesAfterEnv: [ + '<rootDir>/tests/setup.js', + ], + testEnvironment: 'jsdom', + transform: { + '^.+\\.ts$': 'ts-jest', + '^.+\\.js$': 'babel-jest', + '^.+\\.vue$': '@vue/vue2-jest', + }, + transformIgnorePatterns: [`/node_modules/(?!${esModules})`], +} |