summaryrefslogtreecommitdiffstats
path: root/jest.config.js
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-03-15 16:32:00 +0100
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-03-15 17:08:58 +0100
commit9b82bd312be8dadc3179dd7e3f818fd31c03ba90 (patch)
tree3b52c0c320d88bf36de51d661e318e40130c10f3 /jest.config.js
parent026ef7e01b48051d35ef97b018584884b5db9911 (diff)
Add testing
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'jest.config.js')
-rw-r--r--jest.config.js24
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})`],
+}