Skip to content

Commit

Permalink
refactor: change test to accept any error code besides 404
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeintner committed Mar 18, 2024
1 parent 0b7b108 commit 7f50687
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/td-tools/test/ThingModelHelperTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,7 @@ class ThingModelHelperTest {
],
} as unknown as ThingModel;

await expect(this.thingModelHelpers.getPartialTDs(thing)).to.be.rejectedWith(
Error,
"http status code not 200 but 404 for http://example.com/models/colored-lamp-1.0.0.tm.jsonld"
);
await expect(this.thingModelHelpers.getPartialTDs(thing)).to.be.rejectedWith(Error, "http status code not 200");
}

@test async "should fail on unavailable linked ThingModel - https"() {
Expand All @@ -489,7 +486,7 @@ class ThingModelHelperTest {

await expect(this.thingModelHelpers.getPartialTDs(thing)).to.be.rejectedWith(
Error,
"https status code not 200 but 404 for https://example.com/models/colored-lamp-1.0.0.tm.jsonld"
"https status code not 200"
);
}
}

0 comments on commit 7f50687

Please sign in to comment.