mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
12 lines
453 B
TypeScript
12 lines
453 B
TypeScript
![]() |
import etapiUtils = require("./etapi_utils");
|
||
|
const EtapiError = etapiUtils.EtapiError;
|
||
|
|
||
|
describe("EtapiError", () => {
|
||
|
it("should support instanceof", () => {
|
||
|
const anError = new etapiUtils.EtapiError(404, "123", "test");
|
||
|
expect(anError instanceof EtapiError).toBeTruthy();
|
||
|
expect(anError instanceof Error).toBeTruthy();
|
||
|
expect(new Error("Test") instanceof EtapiError).toBeFalsy();
|
||
|
anError.foo();
|
||
|
});
|
||
|
});
|