From b2f3ecf9937b93b0dc70ad1f4ca8c78cf9c7cfb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Mon, 18 Dec 2023 16:32:34 +0100 Subject: [PATCH] fix test --- src/test/e2e/api/openapi/openapi.e2e.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/e2e/api/openapi/openapi.e2e.test.ts b/src/test/e2e/api/openapi/openapi.e2e.test.ts index c73205f11775..db6924c75f94 100644 --- a/src/test/e2e/api/openapi/openapi.e2e.test.ts +++ b/src/test/e2e/api/openapi/openapi.e2e.test.ts @@ -47,7 +47,10 @@ test('should serve the OpenAPI spec with a `version` property', async () => { .expect((res) => { const { version } = res.body.info; // ensure there's no whitespace or leading `v` - expect(semver.clean(version)).toStrictEqual(version); + // clean removes +anything modifier from the version + expect(version).toMatch( + new RegExp(`^${semver.clean(version) ?? 'invalid semver'}`), + ); // ensure the version listed is valid semver expect(semver.parse(version, { loose: false })).toBeTruthy();