markbind
markbind copied to clipboard
Explore migrating functional tests to be managed and invoked with jest
Tell us about your environment
- MarkBind Version: 1.20.0
Rationale: Our current test_site
contains 10 pages, and is getting more unwieldy as we add new features to MarkBind that require functional testing. Since we now have the ability to use multiple test sites (#588), we should split up these pages into multiple test sites, as well as consider if the main test page can be split up as well. This will reduce the size of the diffs when updating functional tests and make it easier to verify that the updates are correct.
Related: https://github.com/MarkBind/markbind/issues/761#issuecomment-472721916
Alternate proposal: Should we consider migrating to Jest snapshot testing? It does seem like we have accidentally rebuilt this functionality with our test sites 😅
Refer to https://github.com/MarkBind/markbind/issues/771#issuecomment-1483841183 for more details
Alternate proposal: Should we consider migrating to Jest snapshot testing? It does seem like we have accidentally rebuilt this functionality with our test sites 😅
Sure, using frameworks is definitely better than relying on our own rolled-out stuff. Maybe modify the OP to discuss about Jest snapshot instead? Or open a new issue.
With the number of test sites that we have now, it might be good to migrate the invocation of these test cases to jest to
- standardize with the rest of our unit cases
- improve the time taken by exploring running the tests in parallel
- NOTE: add these tests into the code coverage
Needs to look into the existing setup in https://github.com/MarkBind/markbind/blob/da0cd19097dd6454f71122ba0aa3a5a2a8c685c2/packages/cli/test/functional/test.js
Warning: I recall having some weird issues when I toyed with this idea some time ago.