tact
tact copied to clipboard
Add cram-like tests for Tact CLI
Would be nice to have cram-like tests. It would be nice to stay within the JS/TS/Node.js ecosystem. On the other hand, something like oclif testing looks like too much JS. It should be based on snapshots, i.e. tests should look a lot like shell interaction histories, resembling e.g. this report. Btw, the cram-like framework we are going to pick should definitely support updating those snapshots.
Here's the cram fork we might use, which continues developing its snapshot-based testing approach: https://github.com/prysk/prysk
Here's the cram fork we might use, which continues developing its snapshot-based testing approach: https://github.com/prysk/prysk
As mentioned in the original post, I'd very much prefer not to mix the Node.js and Python ecosystem within one project.
What if we only use it in CI? Although I agree with your point.
We might end up doing that, but only as the last resort, if there are no alternatives with our ecosystem
Jest has support for snapshot testing, which is probably the most compatible solution to our current repo layout: https://jestjs.io/docs/snapshot-testing
Although we'll have to wrap CLI calls a bit (in child_process calls or something like that)
Jest does have snapshot tests and we use it in Tact. But I also used cram-like tests a lot with OCaml (https://dune.readthedocs.io/en/stable/reference/cram.html) and it's so much better for CLI apps testing than what Jest or oclif is offering.