From 6ac0e16d27d1eda0ea0b452152dc9543fb3249a8 Mon Sep 17 00:00:00 2001 From: nikhil Date: Wed, 24 Aug 2022 00:24:03 -0400 Subject: [PATCH] fix(testci): Accept `alpha` and `beta` package versions testci is currently failing now that package versions have been [bumped to `3.0.0-alpha.0`](https://github.com/freesewing/freesewing/commit/ae40299#diff-2d72bdead8afa0798d18995311992d684348a694c2d5e214e8e4d2b6153e4821). Alpha and beta version numbers have existed before, but only as recently as `v2.1.0-alpha.0` and `v2.7.0-beta.3` respectively, both of which preceded [the assertions in question](https://github.com/freesewing/freesewing/commit/7ddb023c8d13db4f7afa383378f295a53d38238d). This PR updates those assertions to accept `alpha` or `beta` package versions, in addition to the already-supported `rc` and stable (non-suffixed) package versions. --- tests/patterns/config.mjs | 2 +- tests/plugins/shared.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/patterns/config.mjs b/tests/patterns/config.mjs index 415e11d45ac..24bf54faf58 100644 --- a/tests/patterns/config.mjs +++ b/tests/patterns/config.mjs @@ -35,7 +35,7 @@ export const testPatternConfig = (design, pattern, expect, models, patterns) => const chunks = pattern.config.version.split('.') if (chunks.length > 3) { expect(pattern.config.version.split('.').length).to.equal(4) - expect(chunks[2]).to.contain('-rc') + expect(chunks[2]).to.contain.oneOf(['-alpha', '-beta', '-rc']) } else expect(pattern.config.version.split('.').length).to.equal(3) }) diff --git a/tests/plugins/shared.mjs b/tests/plugins/shared.mjs index e7276223e4f..751a702dd98 100644 --- a/tests/plugins/shared.mjs +++ b/tests/plugins/shared.mjs @@ -21,7 +21,7 @@ export const sharedPluginTests = plugin => { const chunks = plugin.version.split('.') if (chunks.length > 3) { chai.expect(plugin.version.split('.').length).to.equal(4) - chai.expect(chunks[2]).to.contain('-rc') + chai.expect(chunks[2]).to.contain.oneOf(['-alpha', '-beta', '-rc']) } else chai.expect(plugin.version.split('.').length).to.equal(3) })