Skip to content
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

yarn test fails out of the box #44

Open
twasink opened this issue Feb 20, 2024 · 2 comments
Open

yarn test fails out of the box #44

twasink opened this issue Feb 20, 2024 · 2 comments

Comments

@twasink
Copy link

twasink commented Feb 20, 2024

Describe the bug
Running the included tests using yarn test doesn't work. The tests as configured use an ESM-based theme, which jest/yarn isn't configured to use. If you change it to use a CJS-based theme, the tests fail.

To Reproduce

  • Create a new clone, and install using yarn
  • Run npx jest
  • Observe the failure message (included as an attachment)

If you then change src/utils/SyntaxHiglight.js to import react-syntax-highlighter/dist/cjs/styles/hljs (to get a CommonJS version), the tests now run, but do not pass. Again, see included failure message as an attachment

Expected behavior
The tests should pass on a clean checkout, or should not be included.

Screenshots
See attachments.

Desktop (please complete the following information):
OS: Windows 11
Browser: N/A
Version: Current checkout (1.2.0)

@twasink
Copy link
Author

twasink commented Feb 20, 2024

esm_failure.txt
cjs_failure.txt

Failures, as mentioned

@phoenixcoded20
Copy link
Contributor

Hi,

theme does not provide test cases as in at this moment.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants