Skip to content

Commit

Permalink
automated testing can be a meme sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
AloyBranCheung committed Nov 25, 2023
1 parent afa8261 commit c3173bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
5 changes: 5 additions & 0 deletions jest.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import nextJest from "next/jest.js"
import { createRequire } from "module"
const require = createRequire(import.meta.url)

const createJestConfig = nextJest({
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
Expand All @@ -12,6 +14,9 @@ const config = {
// setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testEnvironment: "jest-environment-jsdom",
transformIgnorePatterns: ["node_modules/jose/dist/browser/index.js"],
moduleNameMapper: {
"^jose": require.resolve("jose"),
},
}

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
Expand Down
19 changes: 0 additions & 19 deletions src/__tests__/jest/MainLayout.test.tsx

This file was deleted.

0 comments on commit c3173bf

Please sign in to comment.