Skip to content

Commit 3b1b84e

Browse files
committed
scoped tests
1 parent 515627c commit 3b1b84e

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

test/parallel/test-readline-interface.js

+13-3
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,27 @@ function isWarned(emitter) {
2929
{
3030
// Default crlfDelay is 100ms
3131
const fi = new FakeInput();
32-
let rli = new readline.Interface({ input: fi, output: fi });
32+
const rli = new readline.Interface({ input: fi, output: fi });
3333
assert.strictEqual(rli.crlfDelay, 100);
3434
rli.close();
35+
}
3536

37+
{
3638
// Minimum crlfDelay is 100ms
37-
rli = new readline.Interface({ input: fi, output: fi, crlfDelay: 0});
39+
const fi = new FakeInput();
40+
const rli = new readline.Interface({ input: fi, output: fi, crlfDelay: 0});
3841
assert.strictEqual(rli.crlfDelay, 100);
3942
rli.close();
43+
}
4044

45+
{
4146
// Maximum crlfDelay is 2000ms
42-
rli = new readline.Interface({ input: fi, output: fi, crlfDelay: 1 << 30});
47+
const fi = new FakeInput();
48+
const rli = new readline.Interface({
49+
input: fi,
50+
output: fi,
51+
crlfDelay: 1 << 30
52+
});
4353
assert.strictEqual(rli.crlfDelay, 2000);
4454
rli.close();
4555
}

0 commit comments

Comments
 (0)