-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 20241031_monorepo에서_vscode_jest_extension_환경 설정_김승태 #96
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안녕하세요.
전체적으로 소개, 문제 의식 등이 잘 소개되어서 좋았습니다.
몇 가지 부분만 개선하면 더 좋을 것 같습니다.
techpick/src/stores/test.spec.ts | ||
● Test suite failed to run | ||
|
||
Jest encountered an unexpected token | ||
|
||
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. | ||
|
||
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. | ||
|
||
By default "node_modules" folder is ignored by transformers. | ||
|
||
Here's what you can do: | ||
• If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. | ||
• If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript | ||
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. | ||
• If you need a custom transformation specify a "transform" option in your config. | ||
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. | ||
|
||
You'll find more details and examples of these config options in the docs: | ||
https://jestjs.io/docs/configuration | ||
For information about custom transformations, see: | ||
https://jestjs.io/docs/code-transformation | ||
|
||
Details: | ||
|
||
/Users/gimseungtae/Desktop/GIT/F2-TECHPICK/frontend/techpick/src/stores/test.spec.ts:1 | ||
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import { describe, it, expect } from '@jest/globals'; | ||
^^^^^^ | ||
|
||
SyntaxError: Cannot use import statement outside a module | ||
|
||
at Runtime.createScriptFromCode (../../../../.yarn/berry/cache/jest-runtime-npm-29.7.0-120fa64128-10c0.zip/node_modules/jest-runtime/build/index.js:1505:14) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
에러 전문을 넣기보다 보여주고 싶은 핵심 부분만 보여주면 좋을 것 같습니다.
|
||
## Jest란? | ||
|
||
Jest는 메타(구 페이스북)에서 개발한 자바스크립트 테스트 라이브러리입니다. 간편하게 테스트를 할 수 있어 자바스크립트 개발자들에게 많이 사용되고 있습니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jest에 대한 GitHub 링크를 달아주면 어떨까요?
No description provided.