Closed MylesBorins closed 8 years ago
Also, I wanted to write some tests to prove this works... but the current npm test
is pointing at a file that doesn't exist... and it would not appear that all the tests in the test folder are meant to pass.
What is the current way tests on the repo are run?
@TheAlphaNerd how about using the -t parameter?
$ prova test -t provify
Does it work?
We are currently using the -t parameter in our repo. I was just thinking of the particular edge case of people wanting to use prova, but not having to specify prova in their tests.
As our test set grows larger having to augment all of them makes the likelihood of adopting a new tool like prova lower, increases buy in, and in a way is a barrier to entry. I could not come up with a reason to not support this transform by default.
That being said there may be a specific use case I have not envisioned.
I’ll be at oakland.js tomorrow night if you are around and want to chat in person.=
@azer thoughts?
If we're testing a library that works on both Node and browsers it would cause consistency since it won't work for Node. I like the solution though.
azer... if someone is testing a lib that is node only wouldn't they then be able to just run it through tape?
How is prova used in this specific instance? Just as a cli runner?
@TheAlphaNerd yeah, it's also a runner for node; https://i.cloudup.com/R8KQ8Qwspz.png
Ahhh, now I see how this is a problem.
Using prova in the require allows the test runner to work without running in the browser. Could this potentially be solved by piping tap output into prova as you see many tap reporters working?
That being said perhaps I should close this PR... this could easily be solved by documentation in the README letting people know about provify as a solution to this edge case.
The output of browserify works with node, adding browserify support for node scripts (this would also be useful for #57) whenever -t
or -u
is specified
This transform will replace all instances of "tap" or "tape" require statements in a script with require('prova'). This closes #2.