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 mand (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.
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 mand (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.
Share Improve this question edited Jan 30, 2012 at 15:56 mtsr 3,1521 gold badge16 silver badges21 bronze badges asked Jan 30, 2012 at 10:10 marisksmarisks 1,8221 gold badge18 silver badges34 bronze badges 10- the only thing I know is that windows needs paths in node.js to be handled differently. Exmpl; "C:/bla" would need to be "C:\/bla". could be that the dev of jasmine isnt testing on windows.. – japrescott Commented Jan 30, 2012 at 12:21
- Thanks for idea - I'll try to test RegEx used in jasmine-node if it finds windows specific paths. – marisks Commented Jan 30, 2012 at 12:44
-
I've got a project in Windows with a structure similar to yours but I'm not running into your issue. Does it make a difference if you're more explicit that spec is a directory:
jasmine-node --coffee --verbose .\spec\
? – Eric Bock Commented Jan 30, 2012 at 19:10 - No, even more explicit version didn't help. I tested RegEx used in jasmine-node and it is fine. – marisks Commented Jan 31, 2012 at 5:09
- 2 Dude, ditch Jasmine. I use to use Jasmine, that is until Mocha came along. – JP Richardson Commented Feb 1, 2012 at 20:32
2 Answers
Reset to default 3Jasmine-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.
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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744965541a4603657.html
评论列表(0条)