Commit 8fb4ea9f authored by Daniel Bevenius's avatar Daniel Bevenius
Browse files

test: add deprecation code to expectWarning

This commit adds a deprecation code to expectWarning and updates the
function to check the passed code against the code property on the
warning object.

Not all warnings have a deprecation code so for those that don't an
explicit code of common.noWarnCode is required. Passing this skips the
assertion of the code.

PR-URL: https://github.com/nodejs/node/pull/19474


Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarTobias Nießen <tniessen@tnie.de>
parent ebbf3936
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment