Hello, I'm using .withDocs() to load some markdown for a story, which works fine. But when I try to run our jest tests, the test suite fails. Any ideas? Apologies if I'm missing something basic.
test console:
Test suite failed to run
README.md: Unexpected character '#' (1:0)
It's failing because the jest runner doesn't know how to interpret the README.md:
import readme from '../README.md';
Thanks
yes, you got error because jest does not know how to work with md files.
there are few options to resolve this:
jest.transform as I wrote here https://github.com/tuchk4/storybook-readme/issues/52#issuecomment-366975185Thanks Valerii, that was it
Most helpful comment
yes, you got error because jest does not know how to work with md files.
there are few options to resolve this:
jest.transformas I wrote here https://github.com/tuchk4/storybook-readme/issues/52#issuecomment-366975185