From 7f50687fc5f0bd727f78ae02f18ed2c2af662f5d Mon Sep 17 00:00:00 2001 From: danielpeintner Date: Mon, 18 Mar 2024 16:54:49 +0100 Subject: [PATCH] refactor: change test to accept any error code besides 404 --- packages/td-tools/test/ThingModelHelperTest.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/td-tools/test/ThingModelHelperTest.ts b/packages/td-tools/test/ThingModelHelperTest.ts index 68e7fbbcc..ed10501da 100644 --- a/packages/td-tools/test/ThingModelHelperTest.ts +++ b/packages/td-tools/test/ThingModelHelperTest.ts @@ -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"() { @@ -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" ); } }