From 29c6b2dd50f0170470546c076b643855d8d53ffd Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Wed, 20 Dec 2023 15:52:37 +0000 Subject: [PATCH] refactor: write jest config in typescript --- jest.config.js => jest.config.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) rename jest.config.js => jest.config.ts (69%) diff --git a/jest.config.js b/jest.config.ts similarity index 69% rename from jest.config.js rename to jest.config.ts index 5fc957640..f746f4bf9 100644 --- a/jest.config.js +++ b/jest.config.ts @@ -1,6 +1,7 @@ -/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ -module.exports = { - preset: 'ts-jest', +import type { JestConfigWithTsJest } from 'ts-jest'; + +const config: JestConfigWithTsJest = { + preset: 'ts-jest/presets/default-esm', testEnvironment: 'node', moduleNameMapper: { '^openai$': '/src/index.ts', @@ -14,3 +15,5 @@ module.exports = { '/deno_tests/', ], }; + +export default config;