提交 cc89ce01 编写于 作者: D Daniel Imms

Add test for stream.readToMatchingString

上级 c7a639d4
......@@ -56,4 +56,26 @@ suite('Stream', () => {
done();
});
});
test('readToMatchingString - ANSI', function (done: () => void) {
var file = require.toUrl('./fixtures/file.css');
stream.readToMatchingString(file, '\n', 10, 100, (error: Error, result: string) => {
assert.equal(error, null);
assert.equal(result, '/*---------------------------------------------------------------------------------------------');
done();
});
});
test('readToMatchingString - empty', function (done: () => void) {
var file = require.toUrl('./fixtures/empty.txt');
stream.readToMatchingString(file, '\n', 10, 100, (error: Error, result: string) => {
assert.equal(error, null);
assert.equal(result, null);
done();
});
});
});
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册