Was looking at a tape + tap video and tried to get it to work.
OS: Windows 7
Git Bash Shell
node main.js | ./node_modules/.bin/tap-spec
stdout is not a 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 node main.js | ./node_modules/.bin/tap-spec
doesn't fix the problem.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…