How to integrate core Marked.js test cases into extension packages? #3012
Unanswered
calculuschild
asked this question in
Q&A
Replies: 1 comment 9 replies
-
You can get the current tests by installing the marked github repo with something like:
then you will have to create a test framework that uses the files in |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don't know enough about NPM package development....
Given that Marked.js extensions are a thing now, I know how to write unit tests for the extension itself. However, is it possible to also run all of Marked.js's test cases to ensure an extension isn't breaking default functionality?
I'm looking at https://github.com/calculuschild/marked-extended-tables which completely replaces parsing of GFM tables. In addition to the new functions it adds, it should also still pass all of the table-related tests we already cover in Marked. As Marked gets updates and adds more tests to handle edge cases, the extension falls behind, and can't necessarily use the same fixes, which becomes very tedious to manually track.
Is there some best practice way I can automatically include the latest Marked test suite as part of testing the extension each time I update Marked as a dependency? I have Marked as a dev dependency, so it seems like I should be able to reuse that somehow, but testing has always been my weakness.
Beta Was this translation helpful? Give feedback.
All reactions