mirror of
https://github.com/directus/directus.git
synced 2026-02-17 03:03:22 -05:00
18 lines
373 B
TypeScript
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');
|
|
}
|
|
});
|
|
});
|