mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 01:52:28 +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();
|
|
});
|
|
}); |