1

我有这个./package.json

"scripts": {
    "test": "nodeunit test"
}

和这个文件./test/log.coffee

module.exports =
    'Test logging': (test) ->
        test.expect(1)
        console.log("yeah")
        test.ok(true)
        test.done()

当我执行时,npm test我得到这个:OK: 0 assertions (1ms)

但是,当我尝试这些时它运行良好

  • 直接执行nodeunit test
  • 转换./test/log.coffee为 Javascript./test/log.js并执行npm test

我该怎么做才能让我npm test拿起咖啡脚本测试文件?

4

0 回答 0