asynquence icon indicating copy to clipboard operation
asynquence copied to clipboard

contrib: break out tests into separate files for each plugin

Open getify opened this issue 11 years ago • 6 comments

In addition, bundle.js needs to optionally include a test only if building with the plugin in question.

getify avatar May 29 '14 07:05 getify

Maybe you should have to files: bundle.js and bundle-test.js.

legodude17 avatar Jul 28 '16 03:07 legodude17

I actually don't think the tests need to be bundled. I need to figure out how to get npm test to figure out which tests are appropriate to run or not.

getify avatar Jul 28 '16 13:07 getify

So one test file for each plugin, then a single test file that will run the tests that are given by some prereq? What would that be? The ones bundled? User selected? Don't know?

legodude17 avatar Jul 28 '16 20:07 legodude17

Shrugs. I think maybe all plugins present... but then, someone may build a subset (supported by bundle) and want to test only those. Not sure. what to do here. That's why it's an open issue for so long.

getify avatar Jul 28 '16 21:07 getify

I was thinking about a --test option to bundle.js. The default would be all, but otherwise you could specify which tests you want.

legodude17 avatar Jul 31 '16 00:07 legodude17

That could work. If you specify, it tests your bundle (maybe before writing to the file?) but if not, the npm test command tests all in the one big bundle.

getify avatar Jul 31 '16 00:07 getify