Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.catch(err => {
if (!isInvalidTokenError(err)) {
throw new Error('An InvalidTokenError should have been thrown.');
}
strictEqual(err.message, 'missing kid');
});
});