diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2018-12-28 14:33:33 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-01-10 03:22:12 +0100 |
commit | baa4b9b4255922f63ea2b0e3ac92005ae273e3dc (patch) | |
tree | 1bfd28d5534f53aa3525f1330236ad1f578a153a /test/parallel/test-crypto-authenticated.js | |
parent | 284b20bf75ced9f29161275ae3b0d6eac6abe5ef (diff) | |
download | android-node-v8-baa4b9b4255922f63ea2b0e3ac92005ae273e3dc.tar.gz android-node-v8-baa4b9b4255922f63ea2b0e3ac92005ae273e3dc.tar.bz2 android-node-v8-baa4b9b4255922f63ea2b0e3ac92005ae273e3dc.zip |
test: refactor `common.expectWarning()`
The current API is somewhat confusing at times and simpler usage is
possible. This overloads the arguments further to accept objects
with deprecation codes as property keys. It also adds documentation
for the different possible styles.
Besides that it is now going to validate for the code being present
in case of deprecations but not for other cases. The former validation
was not consistent as it only validated some cases and accepted
undefined instead of `common.noWarnCode`. This check is removed due to
the lack of consistency. `common.noWarnCode` is completely removed
due to just being sugar for `undefined`.
This also verifies that the warning order is identical to the order
in which they are triggered.
PR-URL: https://github.com/nodejs/node/pull/25251
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-crypto-authenticated.js')
-rw-r--r-- | test/parallel/test-crypto-authenticated.js | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js index 4f382eae6e..414404511f 100644 --- a/test/parallel/test-crypto-authenticated.js +++ b/test/parallel/test-crypto-authenticated.js @@ -50,25 +50,25 @@ const ciphers = crypto.getCiphers(); const expectedWarnings = common.hasFipsCrypto ? [] : [ - ['Use Cipheriv for counter mode of aes-192-gcm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-192-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-192-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-128-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-128-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-128-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode], - ['Use Cipheriv for counter mode of aes-256-ccm', common.noWarnCode] + ['Use Cipheriv for counter mode of aes-192-gcm'], + ['Use Cipheriv for counter mode of aes-192-ccm'], + ['Use Cipheriv for counter mode of aes-192-ccm'], + ['Use Cipheriv for counter mode of aes-128-ccm'], + ['Use Cipheriv for counter mode of aes-128-ccm'], + ['Use Cipheriv for counter mode of aes-128-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'], + ['Use Cipheriv for counter mode of aes-256-ccm'] ]; const expectedDeprecationWarnings = [ |