When I setup a test again the AppShell in Micro-Frontend Application Development, then I added the test command to the scripts section in the package.json
now the scripts section should be shown as below.
However when i run the test with pnpm test, I encoutered the error in the following image.
"AppShell › renders
The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
Consider using the "jsdom" test environment."
based on the suggestion, i added the environment tag jsdom to the test command, then the test run is succeed.
The successful test run is shown below.
No comments:
Post a Comment