vite + tsconfig alias 경로 설정으로 인한 jest.config.js 경로 설정 관련 에러 관련 로직 공유#123
Draft
vite + tsconfig alias 경로 설정으로 인한 jest.config.js 경로 설정 관련 에러 관련 로직 공유#123
Conversation
✅ Deploy Preview for how-about-it ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
feel5ny
reviewed
Feb 9, 2023
Comment on lines
+6
to
+10
| '^@/(.*)$': '<rootDir>/src/$1', | ||
|
|
||
| // '\\assets/.(jpg|jpeg|png)$': '<rootDir>/__mocks__/fileMock.js', | ||
| '\\.(jpg|jpeg|png)$': '<rootDir>/__mocks__/fileMock.js', | ||
| '\\.(css|style|less|sass|scss|svg)$': 'identity-obj-proxy', |
Collaborator
There was a problem hiding this comment.
Suggested change
| '^@/(.*)$': '<rootDir>/src/$1', | |
| // '\\assets/.(jpg|jpeg|png)$': '<rootDir>/__mocks__/fileMock.js', | |
| '\\.(jpg|jpeg|png)$': '<rootDir>/__mocks__/fileMock.js', | |
| '\\.(css|style|less|sass|scss|svg)$': 'identity-obj-proxy', | |
| '@/assets(.*)$': '<rootDir>/__mocks__/fileMock.js', | |
| '^@/(.*)$': '<rootDir>/src/$1', | |
| '\\.(jpg|jpeg|png)$': '<rootDir>/__mocks__/fileMock.js', | |
| '\\.(css|style|less|sass|scss|svg)$': 'identity-obj-proxy', |
요렇게 해보시겠어요?
Collaborator
There was a problem hiding this comment.
\\assets/.(jpg|jpeg|png)$
\\assets 여기서부터 찾지 못했을거에요 루트 directory를 지정해주지 않아서요-!
루트를 지정해주되, '^@/(.*)$': '/src/$1', 보다 작은 범위의 조건이라 윗줄에 지정해두어서, fileMock을 참조하게 하면 되는군요~
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Linked Issues
📖 bug 발생 원인
참고 자료
반영 브랜치
chore/test-config
✅ PR 포인트 & 궁금한 점