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: #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 jasnell committed Oct 17, 2018
1 parent f1997b7 commit 3c329be
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 3c329be

Please sign in to comment.