From a22214f2a2efcdac2666e1aad3332cb49d2f2198 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 25 Sep 2023 15:24:06 +0200 Subject: build: convert project to esm --- jest.config.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'jest.config.js') diff --git a/jest.config.js b/jest.config.js index e31f939..77cabb1 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,16 +1,18 @@ -const nextJest = require('next/jest'); +import nextJest from 'next/jest.js'; const createJestConfig = nextJest({ // Provide the path to your Next.js app to load next.config.js and .env files in your test environment dir: './', }); -/* +/** * Add any custom config to be passed to Jest * * For a detailed explanation regarding each configuration property and type * check, visit: * https://jestjs.io/docs/configuration + * + * @type {import('jest').Config} */ const customJestConfig = { // if using TypeScript with a baseUrl set to the root directory then you need the below for alias' to work @@ -33,4 +35,4 @@ const customJestConfig = { * createJestConfig is exported this way to ensure that next/jest can load the * Next.js config which is async. */ -module.exports = createJestConfig(customJestConfig); +export default createJestConfig(customJestConfig); -- cgit v1.2.3