Skip to content

Commit

Permalink
readline: assert without the use of event listener
Browse files Browse the repository at this point in the history
PR-URL: nodejs#23472
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
Lian Li authored and Trott committed Oct 14, 2018
1 parent 7f74515 commit f569ecf
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions test/parallel/test-readline-emit-keypress-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ stream.on('keypress', (s, k) => {

stream.write('foo');

process.on('exit', () => {
assert.deepStrictEqual(sequence, ['f', 'o', 'o']);
assert.deepStrictEqual(keys, [
{ sequence: 'f', name: 'f', ctrl: false, meta: false, shift: false },
{ sequence: 'o', name: 'o', ctrl: false, meta: false, shift: false },
{ sequence: 'o', name: 'o', ctrl: false, meta: false, shift: false }
]);
});
assert.deepStrictEqual(sequence, ['f', 'o', 'o']);
assert.deepStrictEqual(keys, [
{ sequence: 'f', name: 'f', ctrl: false, meta: false, shift: false },
{ sequence: 'o', name: 'o', ctrl: false, meta: false, shift: false },
{ sequence: 'o', name: 'o', ctrl: false, meta: false, shift: false }
]);

0 comments on commit f569ecf

Please sign in to comment.