We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Mocking prismjs was a bit difficult in one of the consumers. I tried this in the test file:
jest.mock('prismjs/components/index'); jest.mock('prismjs', () => ({ highlightAllUnder: jest.fn(), }));
Sadly that did not work & I had to create mock files like this:
// __mocks__/prismjs/components/index.js const loadLanguages = jest.fn(); export default loadLanguages;
// __mocks__/prismjs.js export default { highlightAllUnder: jest.fn(), };
Figure out if that is the best way to do this & add something to the README about it so others don't waste time on it.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Mocking prismjs was a bit difficult in one of the consumers. I tried this in the test file:
Sadly that did not work & I had to create mock files like this:
Figure out if that is the best way to do this & add something to the README about it so others don't waste time on it.
The text was updated successfully, but these errors were encountered: