How to generate unit tests from a JS module automatically?
问题 I have inherited a project with multiple JavaScript files. Each of them has a bunch of functions; the files are defined in AMD style. For instance: math.js define([], function () { return { func1: function (a, b) { return a + b; }, func2: function (c, d) { return c + d; }, }; }); I would like to generate a new file in the tests folder with the name ( math.js ) that will contain the boilerplate code for the unit tests in tdd style for the intern framework. I have used the intern-generator, a