chore: fix tests & deps
This commit is contained in:
parent
e7a53a4c39
commit
cd8dc606a8
5 changed files with 18 additions and 17 deletions
14
jest.config.js
Normal file
14
jest.config.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
const nextJest = require('next/jest')
|
||||
|
||||
const createJestConfig = nextJest({
|
||||
dir: './',
|
||||
})
|
||||
|
||||
const customJestConfig = {
|
||||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
||||
testEnvironment: 'jest-environment-jsdom',
|
||||
modulePathIgnorePatterns: ["<rootDir>/dist/"],
|
||||
testPathIgnorePatterns: ["<rootDir>/e2e"],
|
||||
}
|
||||
|
||||
module.exports = createJestConfig(customJestConfig)
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
import nextJest from "next/jest.js"
|
||||
|
||||
const createJestConfig = nextJest({
|
||||
dir: "./",
|
||||
})
|
||||
|
||||
/** @type {import('jest').Config} */
|
||||
const config = {
|
||||
setupFilesAfterEnv: ["@testing-library/jest-dom/extend-expect"],
|
||||
testEnvironment: "jest-environment-jsdom",
|
||||
modulePathIgnorePatterns: ["<rootDir>/dist/"],
|
||||
testPathIgnorePatterns: ["<rootDir>/e2e"],
|
||||
}
|
||||
|
||||
export default createJestConfig(config)
|
||||
2
jest.setup.js
Normal file
2
jest.setup.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
// Learn more: https://github.com/testing-library/jest-dom
|
||||
import '@testing-library/jest-dom'
|
||||
|
|
@ -18,8 +18,8 @@
|
|||
"e2e:headless": "playwright test",
|
||||
"e2e:ui": "playwright test --ui",
|
||||
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
|
||||
"preinstall": "npx npm-only-allow@latest --PM yarn",
|
||||
"postinstall": "npx patch-package -y",
|
||||
"preinstall": "npx npm-only-allow --PM yarn",
|
||||
"coupling-graph": "npx madge --extensions js,jsx,ts,tsx,css,md,mdx ./ --exclude '.next|tailwind.config.js|reset.d.ts|prettier.config.js|postcss.config.js|playwright.config.ts|next.config.js|next-env.d.ts|instrumentation.ts|e2e/|README.md|.storybook/|.eslintrc.js' --image graph.svg"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,6 @@
|
|||
"incremental": true,
|
||||
"baseUrl": "."
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.mjs"],
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.mjs", "jest.config.js"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue