From c28b0339fcaa40e7ef26b15e556ed01dde327845 Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Sun, 21 Nov 2021 16:08:07 +0100 Subject: [PATCH] chore: Add plugin tests to configure script --- config/scripts.yaml | 2 ++ packages/plugin-banner/package.json | 2 +- packages/plugin-bartack/package.json | 2 +- packages/plugin-bundle/package.json | 2 +- packages/plugin-bust/package.json | 2 +- packages/plugin-buttons/package.json | 2 +- packages/plugin-cutonfold/package.json | 2 +- packages/plugin-dimension/package.json | 2 +- packages/plugin-export-dxf/package.json | 2 +- packages/plugin-flip/package.json | 2 +- packages/plugin-gore/package.json | 2 +- packages/plugin-grainline/package.json | 2 +- packages/plugin-i18n/package.json | 2 +- packages/plugin-logo/package.json | 2 +- packages/plugin-measurements/package.json | 2 +- packages/plugin-mirror/package.json | 2 +- packages/plugin-notches/package.json | 2 +- packages/plugin-round/package.json | 2 +- packages/plugin-scalebox/package.json | 2 +- packages/plugin-sprinkle/package.json | 2 +- packages/plugin-svgattr/package.json | 2 +- packages/plugin-theme/package.json | 2 +- packages/plugin-title/package.json | 2 +- packages/plugin-validate/package.json | 2 +- packages/plugin-versionfree-svg/package.json | 2 +- 25 files changed, 26 insertions(+), 24 deletions(-) diff --git a/config/scripts.yaml b/config/scripts.yaml index bbfe50ae002..2f60f3358e7 100644 --- a/config/scripts.yaml +++ b/config/scripts.yaml @@ -12,6 +12,8 @@ _types: netlify: 'echo "Not configured yet"' test: 'BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register' testci: 'BABEL_ENV=production ./node_modules/.bin/_mocha tests/*.test.js --require @babel/register' + plugin: + test: 'BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register' create-freesewing-pattern: clean: '!' nodebuild: '!' diff --git a/packages/plugin-banner/package.json b/packages/plugin-banner/package.json index 141dddfa5c3..fd7e069b977 100644 --- a/packages/plugin-banner/package.json +++ b/packages/plugin-banner/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "BABEL_ENV=production ../../node_modules/.bin/mocha tests/*.test.js --require @babel/register", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-bartack/package.json b/packages/plugin-bartack/package.json index bc21f3a7b59..b8504d780fc 100644 --- a/packages/plugin-bartack/package.json +++ b/packages/plugin-bartack/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "BABEL_ENV=production ../../node_modules/.bin/mocha tests/*.test.js --require @babel/register", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-bundle/package.json b/packages/plugin-bundle/package.json index 1d22a927376..1412f1d9985 100644 --- a/packages/plugin-bundle/package.json +++ b/packages/plugin-bundle/package.json @@ -31,7 +31,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "BABEL_ENV=production ../../node_modules/.bin/mocha tests/*.test.js --require @babel/register", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-bust/package.json b/packages/plugin-bust/package.json index 39a26af0566..e7931fadda4 100644 --- a/packages/plugin-bust/package.json +++ b/packages/plugin-bust/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "BABEL_ENV=production ../../node_modules/.bin/mocha tests/*.test.js --require @babel/register", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-buttons/package.json b/packages/plugin-buttons/package.json index a99338c21fc..bed0cffcfd6 100644 --- a/packages/plugin-buttons/package.json +++ b/packages/plugin-buttons/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "BABEL_ENV=production ../../node_modules/.bin/mocha tests/*.test.js --require @babel/register", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-cutonfold/package.json b/packages/plugin-cutonfold/package.json index 1c5e61bd7ec..286777fc208 100644 --- a/packages/plugin-cutonfold/package.json +++ b/packages/plugin-cutonfold/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "BABEL_ENV=production ../../node_modules/.bin/mocha tests/*.test.js --require @babel/register", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-dimension/package.json b/packages/plugin-dimension/package.json index 1d46fe423b6..511519c6308 100644 --- a/packages/plugin-dimension/package.json +++ b/packages/plugin-dimension/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "BABEL_ENV=production ../../node_modules/.bin/mocha tests/*.test.js --require @babel/register", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-export-dxf/package.json b/packages/plugin-export-dxf/package.json index ef0cfaaddc1..c3bf60d66a5 100644 --- a/packages/plugin-export-dxf/package.json +++ b/packages/plugin-export-dxf/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "BABEL_ENV=production ../../node_modules/.bin/mocha tests/*.test.js --require @babel/register", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-flip/package.json b/packages/plugin-flip/package.json index bcb620e29fa..b267fefd221 100644 --- a/packages/plugin-flip/package.json +++ b/packages/plugin-flip/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-flip: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-gore/package.json b/packages/plugin-gore/package.json index 2535b7c3be1..6f4f18351f2 100644 --- a/packages/plugin-gore/package.json +++ b/packages/plugin-gore/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-gore: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-grainline/package.json b/packages/plugin-grainline/package.json index d098c61c03a..c8204915518 100644 --- a/packages/plugin-grainline/package.json +++ b/packages/plugin-grainline/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-grainline: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-i18n/package.json b/packages/plugin-i18n/package.json index f5cde1896aa..fa9402e7276 100644 --- a/packages/plugin-i18n/package.json +++ b/packages/plugin-i18n/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-i18n: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-logo/package.json b/packages/plugin-logo/package.json index 7b06d9bd2c4..a4275caf6ba 100644 --- a/packages/plugin-logo/package.json +++ b/packages/plugin-logo/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-logo: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-measurements/package.json b/packages/plugin-measurements/package.json index 04bb460f2e2..1bf6981e96c 100644 --- a/packages/plugin-measurements/package.json +++ b/packages/plugin-measurements/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-measurements: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-mirror/package.json b/packages/plugin-mirror/package.json index daf2f05ff82..c3d084ca5bd 100644 --- a/packages/plugin-mirror/package.json +++ b/packages/plugin-mirror/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-mirror: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-notches/package.json b/packages/plugin-notches/package.json index db48e03b0f8..e2d0b479145 100644 --- a/packages/plugin-notches/package.json +++ b/packages/plugin-notches/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-notches: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-round/package.json b/packages/plugin-round/package.json index 7ce4ba87fd7..90d095a13b2 100644 --- a/packages/plugin-round/package.json +++ b/packages/plugin-round/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-round: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-scalebox/package.json b/packages/plugin-scalebox/package.json index 893968e3f5e..99d3a3b1890 100644 --- a/packages/plugin-scalebox/package.json +++ b/packages/plugin-scalebox/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-scalebox: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-sprinkle/package.json b/packages/plugin-sprinkle/package.json index 1d3f871473a..0f50745efc6 100644 --- a/packages/plugin-sprinkle/package.json +++ b/packages/plugin-sprinkle/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-sprinkle: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-svgattr/package.json b/packages/plugin-svgattr/package.json index 81303ac8340..43b73cc272d 100644 --- a/packages/plugin-svgattr/package.json +++ b/packages/plugin-svgattr/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-svgattr: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-theme/package.json b/packages/plugin-theme/package.json index 6c22ebb1039..88da51dad19 100644 --- a/packages/plugin-theme/package.json +++ b/packages/plugin-theme/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "npx node-sass --output-style compressed -r src/scss -o css && echo 'export default `' > src/bundle.css.js && cat css/*.css >> src/bundle.css.js && echo '`;' >> src/bundle.css.js && rollup -c", - "test": "echo \"plugin-theme: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-title/package.json b/packages/plugin-title/package.json index f6e851b3260..d1174b22509 100644 --- a/packages/plugin-title/package.json +++ b/packages/plugin-title/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "BABEL_ENV=production ../../node_modules/.bin/mocha tests/*.test.js --require @babel/register", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-validate/package.json b/packages/plugin-validate/package.json index b9b51c04a93..06785476a01 100644 --- a/packages/plugin-validate/package.json +++ b/packages/plugin-validate/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-validate: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -", diff --git a/packages/plugin-versionfree-svg/package.json b/packages/plugin-versionfree-svg/package.json index 6ad6700d819..9c96cbbdb30 100644 --- a/packages/plugin-versionfree-svg/package.json +++ b/packages/plugin-versionfree-svg/package.json @@ -30,7 +30,7 @@ "clean": "rimraf dist", "build": "rollup -c", "lernabuild": "rollup -c", - "test": "echo \"plugin-versionfree-svg: No tests configured. Perhaps you'd like to do this?\" && exit 0", + "test": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register", "pubtest": "npm publish --registry http://localhost:6662", "pubforce": "npm publish", "symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -",