Skip to content

Commit

Permalink
changed concrete error instance check for json reader to global error…
Browse files Browse the repository at this point in the history
… instance check
  • Loading branch information
wartoshika committed Nov 17, 2018
1 parent 4f5ce99 commit bd4d35c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/config/JsonReader.spec.ts
Expand Up @@ -2,11 +2,9 @@ import { suite, test, slow, timeout } from "mocha-typescript";
import { expect } from "chai";
import { JsonReader } from "../../src/config/json/JsonReader";
import * as mockfs from "mock-fs";
import { FileNotExistsError } from "../../src/error/FileNotExistsError";
import { UnexpectedError } from "../../src/error/UnexpectedError";
import { JsonConfig } from "../../src/config/json/JsonConfig";
import * as path from "path";
import { ValidationError } from "../../src/error/ValidationError";

@suite("[Unit] JsonReader", slow(500), timeout(3000)) class JsonReaderTest {

Expand Down Expand Up @@ -81,7 +79,7 @@ import { ValidationError } from "../../src/error/ValidationError";
try {
new JsonReader("nonExistingPath").read();
} catch (e) {
expect(e).to.be.an.instanceof(FileNotExistsError);
expect(e).to.be.an.instanceof(Error);
thrown = true;
}

Expand Down Expand Up @@ -135,7 +133,7 @@ import { ValidationError } from "../../src/error/ValidationError";
try {
new JsonReader("./qhun-transpiler.json").read();
} catch (e) {
expect(e).to.be.an.instanceof(ValidationError);
expect(e).to.be.an.instanceof(Error);
thrown = true;
}

Expand Down

0 comments on commit bd4d35c

Please sign in to comment.