You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolve .jsx parsing issue that is leading to runtime errors in unit tests files with the sufix .js that contain JSX elements.
Example: Exception during run: SyntaxError[ @/Users/raymessina/Desktop/__store git/vets-website/src/platform/user/tests/authentication/components/SessionTimeoutModal.unit.spec.js ]: Unexpected token '<' at compileSourceTextModule (node:internal/modules/esm/utils:340:16) at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18) at ModuleLoader.#translate (node:internal/modules/esm/loader:433:12) at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:480:27) at ModuleJob._link (node:internal/modules/esm/module_job:112:19)
Details
May also be related to this warning: Warning: Module type of file:///Users/raymessina/Desktop/__store%20git/vets-website/src/platform/testing/unit/mocha-setup.js is not specified and it doesn't parse as CommonJS. Reparsing as ES module because module syntax was detected. This incurs a performance overhead. To eliminate this warning, add "type": "module" to /Users/raymessina/Desktop/__store git/vets-website/src/platform/testing/package.json.
Tasks
Check Mocha configurations
Check Babel configurations
What overhead would Webpack entail
If necessary swap suffixes for .jsx
Acceptance Criteria
should be able to run test directories with unit tests files with the sufix .js that contain JSX elements.
other tests and features should not be adversely affected
The text was updated successfully, but these errors were encountered:
Description
Resolve .jsx parsing issue that is leading to runtime errors in unit tests files with the sufix .js that contain JSX elements.
Example:
Exception during run: SyntaxError[ @/Users/raymessina/Desktop/__store git/vets-website/src/platform/user/tests/authentication/components/SessionTimeoutModal.unit.spec.js ]: Unexpected token '<' at compileSourceTextModule (node:internal/modules/esm/utils:340:16) at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18) at ModuleLoader.#translate (node:internal/modules/esm/loader:433:12) at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:480:27) at ModuleJob._link (node:internal/modules/esm/module_job:112:19)
Details
May also be related to this warning:
Warning: Module type of file:///Users/raymessina/Desktop/__store%20git/vets-website/src/platform/testing/unit/mocha-setup.js is not specified and it doesn't parse as CommonJS. Reparsing as ES module because module syntax was detected. This incurs a performance overhead. To eliminate this warning, add "type": "module" to /Users/raymessina/Desktop/__store git/vets-website/src/platform/testing/package.json.
Tasks
Acceptance Criteria
The text was updated successfully, but these errors were encountered: