Test WrapKey operation with malformed parameters On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS crypto.subtle.wrapKey() rejected promise with TypeError: Not enough arguments. PASS crypto.subtle.wrapKey(1) rejected promise with TypeError: Not enough arguments. PASS crypto.subtle.wrapKey(1, 2) rejected promise with TypeError: Not enough arguments. PASS crypto.subtle.wrapKey(1, 2, 3) rejected promise with TypeError: Not enough arguments. PASS crypto.subtle.wrapKey("raw", key, wrappingKey, "HMAC") rejected promise with NotSupportedError: The operation is not supported.. PASS crypto.subtle.wrapKey("raw", key, wrappingKey, aesCbcParams) rejected promise with InvalidAccessError: Wrapping CryptoKey doesn't match AlgorithmIdentifier. PASS crypto.subtle.wrapKey("raw", key, wrappingKey, "AES-KW") rejected promise with InvalidAccessError: The CryptoKey is nonextractable. PASS crypto.subtle.wrapKey("raw", key, wrappingKey, "AES-KW") rejected promise with InvalidAccessError: Wrapping CryptoKey doesn't support wrapKey operation. PASS successfullyParsed is true TEST COMPLETE