我正在关注这个例子:http://brianstoner.com/blog/testing-in-nodejs-with-mocha/
我在根目录中定义了一个Makefile:
REPORTER = dot
test:
@NODE_ENV=test ./node_modules/.bin/mocha \
--reporter $(REPORTER) \
test-w:
@NODE_ENV=test ./node_modules/.bin/mocha \
--reporter $(REPORTER) \
--watch
.PHONY: test test-w
Run Code Online (Sandbox Code Playgroud)
但是当我运行'make test'时,它说"make:没有什么可以做'test'."
cho*_*ovy 22
结果Makefile是标签敏感的 - 当我剪切粘贴文件时,那些被破坏了...
在vi中,我打开了标签和间距来修复它:
vi Makefile
:set list
Run Code Online (Sandbox Code Playgroud)
现在您可以重新保留文件并确保正确执行该操作.