Closed AshKyd closed 1 year ago
You're not wrong about the diff 🤪
Ah I worked out what went wrong. If you ignore whitespace it's only a couple of lines changed.
Thanks @drzax. I double checked and your assumptions are correct. I've left code comments as such. I've also included your suggestions and added a Github Workflow to run the tests in CI. I think this is ready to review now 👍
Just wondering if your editor is setup to follow .editorconfig files. Theoretically there shouldn't be whitespace only differences, I thought.
This is because I split the code out from the wrapper function, so the indentation changed. Can't be helped here.
By exposing the generate & build methods directly to Jest we can skip the command line and test programmatically.
I picked Jest because it's fairly standard and will work everywhere.
To try it out, run
npm test
:PS: this is a shocking diff. Use "hide whitespace" mode for a better experience.