mantis-free-react-admin-template
mantis-free-react-admin-template copied to clipboard
`yarn test` fails out of the box
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)
Hi,
theme does not provide test cases as in at this moment.
Regards.