From eb6ceebf90ba45ec5b803f32b9b080829f6a973a Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Wed, 20 Dec 2023 10:52:42 -0500 Subject: [PATCH] refactor: write jest config in typescript (#588) --- 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;