From eb2e045d353dd47473940894ea09809f736325f5 Mon Sep 17 00:00:00 2001 From: Ken Fukuyama Date: Wed, 12 Oct 2022 11:31:26 +0900 Subject: [PATCH] modify jest.config.js --- jest.config.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/jest.config.js b/jest.config.js index 4223a4f..17320ad 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,8 +1,13 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { preset: 'ts-jest/presets/js-with-ts-esm', + globals: { + 'ts-jest': { + useESM: true, + }, + }, + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, testEnvironment: 'node', - - // Automatically clear mock calls, instances, contexts and results before every test - clearMocks: true, };