Skip to content

Commit

Permalink
test: fix multiple expectedWarnings bug
Browse files Browse the repository at this point in the history
Commit 8fb4ea9 ("test: add deprecation code to expectWarning") did
not take into account that the same warning could be expected multiple
times. This bug was discovered in
#18138 and this commit adds a fix for
this issue.

PR-URL: #19766
Refs: #18138
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
danbev committed Apr 6, 2018
1 parent e37effe commit 682b850
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ function expectWarning(name, expected) {
// Remove a warning message after it is seen so that we guarantee that we
// get each message only once.
map.delete(expected);
}, map.size);
}, expected.length);
}

function expectWarningByName(name, expected, code) {
Expand Down

0 comments on commit 682b850

Please sign in to comment.