chore: fix decryption test titles

This commit is contained in:
Filip Skokan 2020-03-17 19:58:59 +01:00
parent af31c079ad
commit a28c4469ce
13 changed files with 68 additions and 68 deletions

View file

@ -61,37 +61,37 @@ test(`${recipe.title} - general decrypt`, t => {
})
})
test(`${recipe.title} - compact verify (failing)`, t => {
test(`${recipe.title} - compact decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (failing)`, t => {
test(`${recipe.title} - flattened decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - compact verify (using empty keystore)`, t => {
test(`${recipe.title} - compact decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (using empty keystore)`, t => {
test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })

View file

@ -49,25 +49,25 @@ test(`${recipe.title} - general decrypt`, t => {
})
})
test(`${recipe.title} - flattened verify (failing)`, t => {
test(`${recipe.title} - flattened decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (using empty keystore)`, t => {
test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })

View file

@ -49,25 +49,25 @@ test(`${recipe.title} - general decrypt`, t => {
})
})
test(`${recipe.title} - flattened verify (failing)`, t => {
test(`${recipe.title} - flattened decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (using empty keystore)`, t => {
test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })

View file

@ -49,25 +49,25 @@ test(`${recipe.title} - general decrypt`, t => {
})
})
test(`${recipe.title} - flattened verify (failing)`, t => {
test(`${recipe.title} - flattened decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (using empty keystore)`, t => {
test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })

View file

@ -45,13 +45,13 @@ test(`${recipe.title} - general decrypt - keystore`, t => {
t.deepEqual(JWE.decrypt(recipe.output.json, keystore), Buffer.from(plaintext))
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })

View file

@ -61,37 +61,37 @@ test(`${recipe.title} - general decrypt`, t => {
})
})
test(`${recipe.title} - compact verify (failing)`, t => {
test(`${recipe.title} - compact decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (failing)`, t => {
test(`${recipe.title} - flattened decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - compact verify (using empty keystore)`, t => {
test(`${recipe.title} - compact decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (using empty keystore)`, t => {
test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })

View file

@ -63,37 +63,37 @@ test(`${recipe.title} - general decrypt`, t => {
})
})
test(`${recipe.title} - compact verify (failing)`, t => {
test(`${recipe.title} - compact decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (failing)`, t => {
test(`${recipe.title} - flattened decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - compact verify (using empty keystore)`, t => {
test(`${recipe.title} - compact decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (using empty keystore)`, t => {
test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })

View file

@ -63,37 +63,37 @@ test(`${recipe.title} - general decrypt`, t => {
})
})
test(`${recipe.title} - compact verify (failing)`, t => {
test(`${recipe.title} - compact decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (failing)`, t => {
test(`${recipe.title} - flattened decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - compact verify (using empty keystore)`, t => {
test(`${recipe.title} - compact decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (using empty keystore)`, t => {
test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })

View file

@ -61,37 +61,37 @@ test(`${recipe.title} - general decrypt`, t => {
})
})
test(`${recipe.title} - compact verify (failing)`, t => {
test(`${recipe.title} - compact decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (failing)`, t => {
test(`${recipe.title} - flattened decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - compact verify (using empty keystore)`, t => {
test(`${recipe.title} - compact decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (using empty keystore)`, t => {
test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })

View file

@ -61,37 +61,37 @@ test(`${recipe.title} - general decrypt`, t => {
})
})
test(`${recipe.title} - compact verify (failing)`, t => {
test(`${recipe.title} - compact decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (failing)`, t => {
test(`${recipe.title} - flattened decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - compact verify (using empty keystore)`, t => {
test(`${recipe.title} - compact decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (using empty keystore)`, t => {
test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })

View file

@ -61,37 +61,37 @@ test(`${recipe.title} - general decrypt`, t => {
})
})
test(`${recipe.title} - compact verify (failing)`, t => {
test(`${recipe.title} - compact decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (failing)`, t => {
test(`${recipe.title} - flattened decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - compact verify (using empty keystore)`, t => {
test(`${recipe.title} - compact decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (using empty keystore)`, t => {
test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })

View file

@ -63,37 +63,37 @@ test(`${recipe.title} - general decrypt`, t => {
})
})
test(`${recipe.title} - compact verify (failing)`, t => {
test(`${recipe.title} - compact decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (failing)`, t => {
test(`${recipe.title} - flattened decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - compact verify (using empty keystore)`, t => {
test(`${recipe.title} - compact decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (using empty keystore)`, t => {
test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })

View file

@ -63,37 +63,37 @@ test(`${recipe.title} - general decrypt`, t => {
})
})
test(`${recipe.title} - compact verify (failing)`, t => {
test(`${recipe.title} - compact decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (failing)`, t => {
test(`${recipe.title} - flattened decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (failing)`, t => {
test(`${recipe.title} - general decrypt (failing)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreMatchNone)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - compact verify (using empty keystore)`, t => {
test(`${recipe.title} - compact decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.compact, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - flattened verify (using empty keystore)`, t => {
test(`${recipe.title} - flattened decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json_flat, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })
})
test(`${recipe.title} - general verify (using empty keystore)`, t => {
test(`${recipe.title} - general decrypt (using empty keystore)`, t => {
t.throws(() => {
JWE.decrypt(recipe.output.json, keystoreEmpty)
}, { instanceOf: errors.JWKSNoMatchingKey, code: 'ERR_JWKS_NO_MATCHING_KEY', message: 'no matching key found in the KeyStore' })