From 1538642e216e8b57e55e38f846c34befeaa429df Mon Sep 17 00:00:00 2001 From: joostdecock Date: Sun, 12 Sep 2021 18:23:58 +0200 Subject: [PATCH] chore: Test for presence of `mm` options And fail if they are used. See: https://github.com/freesewing/freesewing/discussions/1326 --- tests/patterns/config.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/patterns/config.js b/tests/patterns/config.js index 8a12f7c533a..ea304668e6a 100644 --- a/tests/patterns/config.js +++ b/tests/patterns/config.js @@ -5,6 +5,8 @@ const notGarments = [ 'legend', ] const isGarment = design => (notGarments.indexOf(design) === -1) ? true : false +// Some patterns are deprecated and won't support more stringent doll/giant tests +const deprecated = ['theo'] /* @@ -149,6 +151,11 @@ const testPatternConfig = (design, pattern, expect, models, patterns) => { it(` - Should have a maximum >= the default value`, () => { expect(option.max >= option.mm).to.be.true }) + if (deprecated.indexOf(design) === -1) { + it(` - Patterns should not use mm options`, () => { + expect("Does not use mm").to.be.true + }) + } } else if (type === 'object' && typeof option.bool !== 'undefined') { // Boolean option it(` - '${name}' is a boolean option`, () => true)