mirror of
https://github.com/hanzoai/jose.git
synced 2026-09-24 17:00:01 +00:00
21 lines
381 B
JavaScript
21 lines
381 B
JavaScript
import test from 'ava'
|
|
|
|
const { createLocalJWKSet } = await import('#dist')
|
|
|
|
test('LocalJWKSet', async (t) => {
|
|
for (const f of [
|
|
null,
|
|
{},
|
|
{ keys: null },
|
|
{ keys: {} },
|
|
{ keys: [null] },
|
|
{ keys: [0] },
|
|
{ keys: [undefined] },
|
|
{ keys: [[]] },
|
|
1,
|
|
Boolean,
|
|
]) {
|
|
t.throws(() => createLocalJWKSet(f), { code: 'ERR_JWKS_INVALID' })
|
|
}
|
|
})
|