0
正在查看磁帶+點擊視頻並試圖使其工作。
操作系統:Windows 7 的Git的bash shell標準輸出不是tty。使用bash作爲節點+磁帶+ tap-spec
node main.js | ./node_modules/.bin/tap-spec
stdout不是tty設備。
main.js:
var test = require('tape');
var add = require('./add');
test('add: two numbers add correctly', function(t) {
var actual = add(1,2);
var expected = 3;
t.equal(actual, expected);
t.end();
});
add.js:
module.exports = function(a, b) {
return a + b;
};
winpty節點main.js | ./node_modules/.bin/tap-spec 不能解決問題。
你是如何運行的winpty命令是從我原來的職位有什麼不同?它失敗了。你打字的確切命令是什麼?謝謝 – FreddyNoNose
@FreddyNoNose,就像我在回答中聲明的那樣:winpty命令將被編譯爲[winpty工具](https://github.com/rprichard/winpty) – EMX
@FreddyNoNose:我不使用Windows,但是如果你按照答案你會得到它與Git Bash殼牌 – EMX