Mocha(Node.js的测试框架)使用make.
对于我的生活,我找不到兼容的make.exe for Windows.
我的Mac上一切正常.
我尝试过使用VS的nmake.exe和我发现的从Unix移植的make.exe.但它们都是不相容的.
它不仅仅是我
这是makefile:
test:
@./node_modules/.bin/mocha -u tdd -R spec
.PHONY: test
Run Code Online (Sandbox Code Playgroud)
制作barfs.在PHONY中,即使我删除它,它也从不运行mocha命令(或者至少没有输出).
./node_modules/.bin/mocha -u -tdd -R spec直接跑步给我测试报告:
first suite -
? ten should always be equal to 9+1
? zero is less all positive numbers
? There is no i in team
? 3 tests complete (8ms)
Run Code Online (Sandbox Code Playgroud)
Set-Alias make "c:\dev\utils\cygwin\bin\make.exe",现在make test使用标准的Mocha Makefile.我正在测试Bootstrap框架(来自Twitter)并尝试在安装Node.js后在本地构建它.它失败了,因为它找不到较少的模块(我也用'npm install -g less'安装):
C:\Users\geir\code\bootstrap>make
lessc html/less/bootstrap.less > html/css/bootstrap.css
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'C:\cygdrive\c\Users\geir\AppData\Roaming\npm\node_modules\less\bin\lessc'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)
Makefile:2: recipe for target `all' failed
make: *** [all] Error 1
Run Code Online (Sandbox Code Playgroud)
它失败的原因是因为当make正在寻找模块时,"cygdrive"被预先添加到文件夹层次结构中,我已经验证了thtat'minorec'实际上是在C:\ Users\geir\AppData\Roaming \npm \中找到的node_modules\less\bin\lessc,我可以从命令行运行它.
我试过以下但没有成功:
任何线索?