mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
test: improve code coverage in webcrypto API
PR-URL: https://github.com/nodejs/node/pull/38052 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
005ebafbd1
commit
30d7f05fef
@ -152,6 +152,13 @@ async function testSign({ hash,
|
||||
assert(await subtle.verify({ name, hash }, key, sig, plaintext));
|
||||
}
|
||||
|
||||
await assert.rejects(
|
||||
subtle.generateKey({ name }, false, []), {
|
||||
name: 'TypeError',
|
||||
code: 'ERR_MISSING_OPTION',
|
||||
message: 'algorithm.hash is required'
|
||||
});
|
||||
|
||||
// Test failure when no sign usage
|
||||
await assert.rejects(
|
||||
subtle.sign({ name, hash }, noSignKey, plaintext), {
|
||||
|
Loading…
Reference in New Issue
Block a user