Skip to content

Commit

Permalink
Merge pull request eclipse-thingweb#1255 from danielpeintner/issue-1254
Browse files Browse the repository at this point in the history
refactor: change test to accept any error code besides 404
  • Loading branch information
egekorkan authored Mar 18, 2024
2 parents 0b7b108 + 7f50687 commit 1d2e67e
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 1d2e67e

Please sign in to comment.