Files
directus/packages/sdk/tests/errors.test.ts
João af13cfe18e Change token and auth handling behavior. (#5203)
* change tokens and authentication handling/refresh

* update sdk docs
2021-04-22 17:54:30 -04:00

18 lines
373 B
TypeScript

/**
* @jest-environment node
*/
import { NotAuthenticated } from '../src/errors';
describe('errors', function () {
it(`test errors`, async () => {
try {
throw new NotAuthenticated();
} catch (err) {
expect(err instanceof Error).toBe(true);
expect(err instanceof NotAuthenticated).toBe(true);
expect(err.message).toBe('No authentication');
}
});
});