Here is the link to my project on codepen
It’s not your fault really. The project’s tests will only work with a version of marked that exports marked
as a function. I have an old version of this project that still works, and it uses marked 1.1.1, which exports the marked
object as a function. The version you included was 4.0.x which exports marked
as an object with a parse
method which the tests are not using. To pass the tests, you’ll need to remove the 4.0.x version and add a version that exports the marked
function, such as 1.1.1 (there are possibly others with the same interface).
It doesn’t matter that you are rendering with react-markdown. The previewer works and passes most of the tests as it is. This is an issue with the tests on your code, not your code. It looks like the tests try to load version 0.5.0 if marked isn’t already loaded, but loading a newer version with a different interface prevented the tests from correctly testing your code.
I can confirm what @jeremy.a.gray states. Once the 4.0.x version is removed, and the tests are re-run it passes 7/8 with only the last (optional) test not passing.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.