Move moving automated tests to Vitest
Jest isn't the fastest testing framework and we have quite a lot of tests for CahsScript.
Jest also has bad ESM support, so our testing command looks like this
"test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest"
We also still have some .cjs files because of it in the /jest folder
Jest also has a highfootprint, it does have a lot of ecosystem integration but I don't think we use those.
Vitest or AVA or the Deno built-in testing suite all have similar syntax to Jest so should be easy to migrate over to.
CashScript would still have Jest as a DevDependency because of the jestExtensions functionality for the debug tooling...
So the main benefits would be in removed complexity & faster tests
I would like to work on this issue!
Hey @hereje, thank you for your enthusiasm for contributing to this issue! 😄
@mr-zwets had previously started a WIP PR (#233) with a checklist of steps he wanted to include. Did you see this Draft PR and could you give some information on the differences between your approach and his?
Hey @hereje, thank you for your enthusiasm for contributing to this issue! 😄
@mr-zwets had previously started a WIP PR (#233) with a checklist of steps he wanted to include. Did you see this Draft PR and could you give some information on the differences between your approach and his?
Hello,
I didn't notice that PR.
Mine removes the extra test compilation steps and simplifies the conditional test suites such as packages/cashscript/test/e2e/misc/timelocks.test.ts