1 | import { expect } from 'chai';
|
2 |
|
3 | const jwksRsa = require('../src');
|
4 |
|
5 | describe('Errors', () => {
|
6 | describe('#ArgumentError', () => {
|
7 | it('should be exposed', () => {
|
8 | expect(jwksRsa.ArgumentError).not.to.be.null;
|
9 | });
|
10 |
|
11 | it('should have correct name', () => {
|
12 | const err = new jwksRsa.ArgumentError('foo');
|
13 | expect(err.name).to.equal('ArgumentError');
|
14 | });
|
15 | });
|
16 |
|
17 | describe('#JwksError', () => {
|
18 | it('should be exposed', () => {
|
19 | expect(jwksRsa.JwksError).not.to.be.null;
|
20 | });
|
21 |
|
22 | it('should have correct name', () => {
|
23 | const err = new jwksRsa.JwksError('foo');
|
24 | expect(err.name).to.equal('JwksError');
|
25 | });
|
26 | });
|
27 |
|
28 | describe('#JwksRateLimitError', () => {
|
29 | it('should be exposed', () => {
|
30 | expect(jwksRsa.JwksRateLimitError).not.to.be.null;
|
31 | });
|
32 |
|
33 | it('should have correct name', () => {
|
34 | const err = new jwksRsa.JwksRateLimitError('foo');
|
35 | expect(err.name).to.equal('JwksRateLimitError');
|
36 | });
|
37 | });
|
38 |
|
39 | describe('#SigningKeyNotFoundError', () => {
|
40 | it('should be exposed', () => {
|
41 | expect(jwksRsa.SigningKeyNotFoundError).not.to.be.null;
|
42 | });
|
43 |
|
44 | it('should have correct name', () => {
|
45 | const err = new jwksRsa.SigningKeyNotFoundError('foo');
|
46 | expect(err.name).to.equal('SigningKeyNotFoundError');
|
47 | });
|
48 | });
|
49 | });
|