aboutsummaryrefslogtreecommitdiff
path: root/jest.config.js
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2022-05-01 00:56:06 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2022-05-01 00:56:06 +0200
commita7cf03c192470cbab13edeb1aec99e0c66dede10 (patch)
tree581b4430d1de958dcb666bae80a7678332134602 /jest.config.js
parent010f307346e525ac2e4239a0549d2c1a4d6d102b (diff)
Update / use typescript
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 0000000..6b808fc
--- /dev/null
+++ b/jest.config.js
@@ -0,0 +1,24 @@
+/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
+export default {
+ preset: "ts-jest",
+ transform: {
+ "^.+\\.svelte$": [
+ "svelte-jester",
+ {
+ "preprocess": true
+ }
+ ]
+ },
+ moduleNameMapper: {
+ "^\\$lib(.*)$": "<rootDir>/src/lib$1",
+ "^\\$app(.*)$": [".svelte/dev/runtime/app/*", ".svelte/build/runtime/app/*"]
+ },
+ moduleFileExtensions: ["ts", "js", "svelte"],
+ globals: {
+ 'ts-jest': {
+ diagnostics: {
+ ignoreCodes: [ 'TS151001' ],
+ },
+ },
+ },
+}