aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-01-27 18:26:21 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-02-08 21:43:18 +0100
commitbfc1f4d55d02553f761fbc9acc5ed15103455149 (patch)
treecb1650750c2ff1587f7cd0fd215d2179822568ae /packages/main/src
parentrefactor: Extract main window hardening (diff)
downloadsophie-bfc1f4d55d02553f761fbc9acc5ed15103455149.tar.gz
sophie-bfc1f4d55d02553f761fbc9acc5ed15103455149.tar.zst
sophie-bfc1f4d55d02553f761fbc9acc5ed15103455149.zip
build: Add test-utils package
Added as a common devDependency, this lets us handle test utility code from one place. For now, the main reason for its existence is the workaround code for importing jest-each from ESM. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/main/src')
-rw-r--r--packages/main/src/infrastructure/resources/impl/__tests__/getDistResources.spec.ts6
1 files changed, 1 insertions, 5 deletions
diff --git a/packages/main/src/infrastructure/resources/impl/__tests__/getDistResources.spec.ts b/packages/main/src/infrastructure/resources/impl/__tests__/getDistResources.spec.ts
index d045e54..e7e9d71 100644
--- a/packages/main/src/infrastructure/resources/impl/__tests__/getDistResources.spec.ts
+++ b/packages/main/src/infrastructure/resources/impl/__tests__/getDistResources.spec.ts
@@ -20,15 +20,11 @@
20 20
21import os from 'node:os'; 21import os from 'node:os';
22 22
23import eachModule from 'jest-each'; 23import { each } from '@sophie/test-utils';
24 24
25import Resources from '../../Resources'; 25import Resources from '../../Resources';
26import getDistResources from '../getDistResources'; 26import getDistResources from '../getDistResources';
27 27
28// Workaround for jest ESM loader incorrectly wrapping the import in another layer of `default`.
29const each =
30 (eachModule as Partial<typeof import('jest-each')>).default ?? eachModule;
31
32const defaultDevServerURL = 'http://localhost:3000/'; 28const defaultDevServerURL = 'http://localhost:3000/';
33 29
34const [ 30const [