@theFinalArbiter JavaScript code is just like any other code: it has functions, so passing the same parameters should yield the same results. That’s what you test.
There are various JavaScript testing frameworks, such as Mocha and Jest.
Hi guys, I have a JS file I would like to write tests for but I am not sure where to start. The files full path is resources/assets/js/ModelTransformer.js
I tried to setup a test class myself and run with node but then I am bypassing all the babel stuff so it wont work. I also thought about making a test page in addition to my SPA (react) but I rather not clutter the actual code. How would you do this?
Please or to participate in this conversation.