I have an existing project written ecmascript5. The project has no tests and I would like to add. I used jasmine & mocha lightly (not lately...) and now I read about AVA (es6 out of the box)+Sinon and I really like it and I would like to try it.
There are several things I have problem figuring out (perhaps not possible) and I'll appreciate your insights.
I have a file 1.js and I would like to create tests for it at 1.test.js How can I import\use objects\methods from there? I need to refactor the file to export es6 modules or there is an alternative solution? Furthermore, what happens if this file depends on jquery for example?
As I see it now, I need to convert my project to a full es6 project with babel+bundler(webpack) and then I'm good to go.
Another idea, is there a way for Ava to load a page, which loads all the scripts using script tags and thus everything will be available?
Do you have other suggestions?
Any help would be appreciated.