UNPKG

@dasch-swiss/dsp-js

Version:

JavaScript library that handles API requests to Knora

16 lines 729 B
import { AjaxError } from "rxjs/ajax"; import { ApiResponseError } from "./api-response-error"; import { DataError } from "./data-error"; describe("Test class DataError", function () { describe("Test method constructor()", function () { var ajaxError = new AjaxError("Error", new XMLHttpRequest(), {}); var dataError = new DataError("Error", ApiResponseError.fromAjaxError(ajaxError)); it("should be an instance of Error", function () { expect(dataError).toEqual(jasmine.any(Error)); }); it("should be an instance of DataError", function () { expect(dataError).toEqual(jasmine.any(DataError)); }); }); }); //# sourceMappingURL=data-error.spec.js.map