how to run the prova test suite?
jchris opened this issue · comments
When I run:
git clone https://github.com/azer/prova.git
cd prova
npm install
npm test
I get this output:
> prova@1.14.3 test /Users/jchris/code/js/prova
> node test.js
module.js:340
throw err;
^
Error: Cannot find module '/Users/jchris/code/js/prova/test.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
When I run prova
from inside my working directory, I get:
assert object
should be equal /Users/jchris/code/js/prova/test/index.js
v
4. assert.plan(4);
5. assert.equal(3.15, 3.14);
6. assert.ok(true);
^
Error: should be equal
at Test.assert (/Users/jchris/code/js/prova/node_modules/tape/lib/test.js:188:54)
at Test.bound [as _assert] (/Users/jchris/code/js/prova/node_modules/tape/lib/test.js:59:32)
at Test.equal.Test.equals.Test.isEqual.Test.is.Test.strictEqual.Test.strictEquals (/Users/jchris/code/js/prova/node_modules/tape/lib/test.js:311:10)
at Test.bound (/Users/jchris/code/js/prova/node_modules/tape/lib/test.js:59:32)
at Test.<anonymous> (/Users/jchris/code/js/prova/test/index.js:5:10)
at Test.bound [as _cb] (/Users/jchris/code/js/prova/node_modules/tape/lib/test.js:59:32)
at Test.run (/Users/jchris/code/js/prova/node_modules/tape/lib/test.js:72:10)
at Test.bound [as run] (/Users/jchris/code/js/prova/node_modules/tape/lib/test.js:59:32)
at Object.next [as _onImmediate] (/Users/jchris/code/js/prova/node_modules/tape/lib/results.js:66:15)
at processImmediate [as _immediateCallback] (timers.js:336:15)
Expected: 3.14
Actual: 3.15
1 failed, 3 passed assertions.
Which doesn't seem like it's running all the tests in test/
And when I run prova -b
I get a browser window with that same output (only the one failing test).
Is this the expected behavior? I'd like to be using prova heavily on a project but without a test suite, I don't know where to start on fixing little bugs I find with it.
Thanks for any pointers!
looks like I accidentally committed that line failing 3.14 != 3.15
Now when I run the above sequence ending in npm test
I get the following result. I would love to contribute to prova (I especially want to be able to use it as part of a gulp toolchain, but I imagine the path to get there will touch on lots of little things.)
I don't feel comfortable cracking open the source code until I know I won't break existing behavior.
$ npm test
> prova@1.15.0 test /Users/jchris/tmp/prova
> prova test/*
module.js:340
throw err;
^
Error: Cannot find module '/Users/jchris/tmp/prova/test/altjs'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /opt/boxen/nodenv/versions/v0.10.28/lib/node_modules/prova/lib/cli.js:60:5
at Array.forEach (native)
at node (/opt/boxen/nodenv/versions/v0.10.28/lib/node_modules/prova/lib/cli.js:59:9)
at /opt/boxen/nodenv/versions/v0.10.28/lib/node_modules/prova/lib/cli.js:43:39
at /opt/boxen/nodenv/versions/v0.10.28/lib/node_modules/prova/node_modules/flat-glob/index.js:15:7
at next (/opt/boxen/nodenv/versions/v0.10.28/lib/node_modules/prova/node_modules/flat-glob/node_modules/iter/lib/serial.js:12:43)
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
I updated the npm test command, should work now