Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: change test to accept any error code besides 404 #1255

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
);
}
}
Loading