Reputation: 1822
I have installed jasmine-node using npm. My project's directory structure are following:
|-lib\
|-taxCalc.js
|-spec\
|-taxCalc.spec.coffee
|-taxCalc.spec.js
|-src\
|-taxCalc.coffee
When I run jasmine-node from root folder with following command (for CoffeeScript):
jasmine-node --coffee --verbose spec
Finished in 0.015 seconds
0 tests, 0 assertions, 0 failures
Same if I run JavaScript version.
If I explicitly point to spec file tests run fine:
jasmine-node --coffee --verbose spec/taxCalc.spec.coffee
Tax calculation
calculates tax
Finished in 0.009 seconds
1 test, 1 assertion, 0 failures
Documentation says that file names should end with 'spec.js' or 'spec.coffee', so everything seems ok.
P.S. I am running on Windows 7.
Upvotes: 7
Views: 3882
Reputation: 483
Jasmine-node has been updated in the last week to use walkdir instead of findit which now makes it function in windows. Re-run npm install jasmine-node
for the update.
Upvotes: 3
Reputation: 36
Stumbled upon the same problem and have read MarisKs link too late :/ - but came to the same conclusion as described in the issue: At least on Windows 7, file.stat.ino returns always 0, so the function createInodeChecker() in findit/index.js returns always true and the file will be skipped.
Easiest on-the-fly-fix: edit createInodeChecker to
function createInodeChecker() {
var inodes = {};
return function inodeSeen(inode) {
if (inode == 0) {
return false;
}
if (inodes[inode]) {
return true;
} else {
inodes[inode] = true;
return false;
}
}
}
Not nice, but you can work with it.
Upvotes: 2