diff --git a/test/helper.ts b/test/helper.ts index a4a4f01..7bad0c3 100644 --- a/test/helper.ts +++ b/test/helper.ts @@ -6,6 +6,7 @@ */ import { AccessControl } from '../src'; +import { AccessControlError } from '../src/core'; const helper = { expectACError(fn: any, errMsg?: string) { @@ -14,6 +15,7 @@ const helper = { fn(); } catch (err) { expect(err instanceof AccessControl.Error).toEqual(true); + expect(err instanceof AccessControlError).toEqual(true); expect(AccessControl.isAccessControlError(err)).toEqual(true); expect(AccessControl.isACError(err)).toEqual(true); // alias test if (errMsg) expect(err.message).toContain(errMsg);