Skip to content

Commit

Permalink
feat: jest 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
eun-hak committed Jun 25, 2024
1 parent 8b018f5 commit 1a34a4b
Show file tree
Hide file tree
Showing 6 changed files with 2,933 additions and 51 deletions.
4 changes: 4 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* eslint-disable no-undef */
module.exports = {
presets: ['next/babel']
};
9 changes: 9 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-disable no-undef */
module.exports = {
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1' // '@' 접두사를 'src' 디렉토리로 매핑
},
testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testEnvironment: 'jest-environment-jsdom'
};
1 change: 1 addition & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom';
10 changes: 10 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
import withPWA from 'next-pwa';

const nextConfig = {
async redirects() {
return [
{
source: '/',
destination: '/sign',
permanent: true // true로 설정하면 308 리다이렉션, false로 설정하면 307 리다이렉션
}
];
},

images: {
domains: [
'bzbz-file-bucket.s3.ap-northeast-2.amazonaws.com',
Expand Down
Loading

0 comments on commit 1a34a4b

Please sign in to comment.