From 0376ebafaa8cc104bff5fee3a01c6e404265d2c9 Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 15:38:17 -0700 Subject: [PATCH 01/13] Standardized `analyzer` mocha.opts and npm test scripts. --- packages/analyzer/package.json | 8 ++++---- packages/analyzer/test/mocha.opts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/analyzer/package.json b/packages/analyzer/package.json index 34973ff09..d525e3387 100644 --- a/packages/analyzer/package.json +++ b/packages/analyzer/package.json @@ -23,12 +23,12 @@ "release": "npm run compile", "lint": "gulp lint", "tslint": "tslint -p .", - "test": "npm run clean && npm run build && npm run lint && mocha", - "quicktest": "export QUICK_TESTS=true; npm run build && mocha", + "test": "npm run clean && npm run build && npm run lint && mocha 'lib/test/**/*_test.js'", + "quicktest": "export QUICK_TESTS=true; npm run build && mocha 'lib/test/**/*_test.js'", "initBench": "if [ ! -d bower_components ]; then bower install -s -f PolymerElements/app-elements PolymerElements/iron-elements PolymerElements/gold-elements PolymerElements/paper-elements PolymerElements/neon-elements GoogleWebComponents/google-web-components ; fi", "benchmark": "npm run build && npm run initBench && node --expose-gc lib/perf/parse-all-benchmark.js", - "test:unit": "mocha", - "test:watch": "tsc-then -- mocha -c", + "test:unit": "mocha 'lib/test/**/*_test.js'", + "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'", "format": "find src test | grep '\\.js$\\|\\.ts$' | xargs clang-format --style=file -i", "prepublishOnly": "tsc && npm test" }, diff --git a/packages/analyzer/test/mocha.opts b/packages/analyzer/test/mocha.opts index 97032c0da..64a50a639 100644 --- a/packages/analyzer/test/mocha.opts +++ b/packages/analyzer/test/mocha.opts @@ -1,4 +1,4 @@ --ui tdd +--colors --require source-map-support/register --timeout 5000 -lib/test/**/*_test.js From 1d594892863e0d4a7e4ea0e73ec3aa719e3853d6 Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 15:39:37 -0700 Subject: [PATCH 02/13] Standardized `browser-capabilities` mocha.opts and npm test scripts. --- packages/browser-capabilities/package.json | 4 ++-- packages/browser-capabilities/test/mocha.opts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/browser-capabilities/package.json b/packages/browser-capabilities/package.json index 2fd1dc1a9..2fc3b977a 100644 --- a/packages/browser-capabilities/package.json +++ b/packages/browser-capabilities/package.json @@ -14,8 +14,8 @@ "build": "rm -Rf lib/ && tsc", "build:watch": "tsc --watch", "format": "find src -name '*.ts' | xargs clang-format --style=file -i", - "test": "npm run build && mocha", - "test:unit": "mocha", + "test": "npm run build && mocha 'lib/test/**/*_test.js'", + "test:unit": "mocha 'lib/test/**/*_test.js'", "test:watch": "watchy -w src -- npm run test" }, "devDependencies": { diff --git a/packages/browser-capabilities/test/mocha.opts b/packages/browser-capabilities/test/mocha.opts index 97032c0da..64a50a639 100644 --- a/packages/browser-capabilities/test/mocha.opts +++ b/packages/browser-capabilities/test/mocha.opts @@ -1,4 +1,4 @@ --ui tdd +--colors --require source-map-support/register --timeout 5000 -lib/test/**/*_test.js From aafd318cb5e71867feba716b72b37d499be0bd84 Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 15:40:35 -0700 Subject: [PATCH 03/13] Standardized `build` mocha.opts and npm test scripts. --- packages/build/package.json | 4 ++-- packages/build/test/mocha.opts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/build/package.json b/packages/build/package.json index 0689f705b..3882c51b5 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -8,8 +8,8 @@ "lint": "gulp lint", "build": "gulp build", "test": "gulp lint test", - "test:unit": "gulp test:unit", - "test:watch": "tsc-then -- mocha -c", + "test:unit": "mocha 'lib/test/**/*_test.js'", + "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'", "prepublishOnly": "npm test", "format": "find src/ -iname '*.ts' -o -iname '*.js' | xargs clang-format --style=file -i" }, diff --git a/packages/build/test/mocha.opts b/packages/build/test/mocha.opts index 97032c0da..64a50a639 100644 --- a/packages/build/test/mocha.opts +++ b/packages/build/test/mocha.opts @@ -1,4 +1,4 @@ --ui tdd +--colors --require source-map-support/register --timeout 5000 -lib/test/**/*_test.js From d2db882918098bd5eab033bf2aeda1ba19b8fb9e Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 15:44:47 -0700 Subject: [PATCH 04/13] Standardized `bundler` mocha.opts and npm test scripts. --- packages/bundler/package.json | 6 +++--- packages/bundler/test/mocha.opts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/bundler/package.json b/packages/bundler/package.json index 8dc8c844f..7fa5d08b7 100644 --- a/packages/bundler/package.json +++ b/packages/bundler/package.json @@ -56,9 +56,9 @@ "scripts": { "build": "tsc", "format": "find src | grep '\\.js$\\|\\.ts$' | xargs ./node_modules/.bin/clang-format --style=file -i", - "test": "npm run build && tslint -c tslint.json src/*.ts src/**/*.ts && mocha", - "test:unit": "mocha", - "test:watch": "tsc-then -- mocha" + "test": "npm run build && tslint -c tslint.json 'src/**/*.ts' && mocha 'lib/test/**/*_test.js'", + "test:unit": "mocha 'lib/test/**/*_test.js'", + "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'" }, "author": "The Polymer Project Authors", "license": "BSD-3-Clause", diff --git a/packages/bundler/test/mocha.opts b/packages/bundler/test/mocha.opts index 867b4ed6f..05962f5da 100644 --- a/packages/bundler/test/mocha.opts +++ b/packages/bundler/test/mocha.opts @@ -1,4 +1,4 @@ --ui tdd +--colors --require source-map-support/register --timeout 20000 -lib/test From 8ff895508be09e55230b435722d7cd4d895a0774 Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 15:47:28 -0700 Subject: [PATCH 05/13] Standardized `cli` mocha.opts and npm test scripts. --- packages/cli/package.json | 6 +++--- packages/cli/test/mocha.opts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 24f27e2de..8b0710858 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -15,10 +15,10 @@ "test": "gulp test lint", "test:smoke": "gulp test", "test:smoke-lint": "gulp test lint", - "test:integration": "gulp test:integration", - "test:unit": "gulp test:unit", + "test:integration": "mocha 'lib/test/integration/**/*_test.js'", + "test:unit": "mocha 'lib/test/unit/**/*_test.js'", "format": "find src gulpfile.js \\( -iname '*.ts' -o -iname '*.js' \\) -not -path '*fixtures*' | xargs clang-format --style=file -i", - "test:watch": "tsc-then -- mocha -c --ui tdd lib/test/integration/*_test.js lib/test/unit/*_test.js lib/test/unit/*/*_test.js" + "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'" }, "repository": { "type": "git", diff --git a/packages/cli/test/mocha.opts b/packages/cli/test/mocha.opts index 4f179a309..64a50a639 100644 --- a/packages/cli/test/mocha.opts +++ b/packages/cli/test/mocha.opts @@ -1,4 +1,4 @@ --ui tdd +--colors --require source-map-support/register --timeout 5000 - From 0628cf33053c6939e9fe4c28e0fb2dc0436dc229 Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 15:49:25 -0700 Subject: [PATCH 06/13] Standardized `editor-service` mocha.opts and npm test scripts. --- packages/editor-service/package.json | 6 +++--- packages/editor-service/test/mocha.opts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/editor-service/package.json b/packages/editor-service/package.json index 9475d8c5f..f7cb8c02c 100644 --- a/packages/editor-service/package.json +++ b/packages/editor-service/package.json @@ -17,9 +17,9 @@ "build": "tsc", "prepublishOnly": "npm run clean && npm run build", "lint": "tslint --project ./tsconfig.json", - "test": "npm run clean && npm run build && mocha && npm run lint", - "test:unit": "mocha", - "test:watch": "tsc-then -- mocha", + "test": "npm run clean && npm run build && mocha 'lib/test/**/*_test.js' && npm run lint", + "test:unit": "mocha 'lib/test/**/*_test.js'", + "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'", "format": "find src test | grep '\\.js$\\|\\.ts$' | xargs ./node_modules/.bin/clang-format --style=file -i" }, "devDependencies": { diff --git a/packages/editor-service/test/mocha.opts b/packages/editor-service/test/mocha.opts index 89240f395..46f5f3754 100644 --- a/packages/editor-service/test/mocha.opts +++ b/packages/editor-service/test/mocha.opts @@ -1,5 +1,5 @@ --ui tdd +--colors --require source-map-support/register --retries 3 --timeout 5000 -lib/test/*_test.js lib/test/**/*_test.js From 98d4f6d1e43623ac3e4217a8f2482168fa0df38a Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 15:50:47 -0700 Subject: [PATCH 07/13] Standardized `linter` mocha.opts and npm test scripts. --- packages/linter/package.json | 6 +++--- packages/linter/test/mocha.opts | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/linter/package.json b/packages/linter/package.json index c9dd4b250..3533e9fe8 100644 --- a/packages/linter/package.json +++ b/packages/linter/package.json @@ -46,9 +46,9 @@ "clean": "touch lib && rm -rf lib && mkdir lib", "format": "find src | grep \"\\.[jt]s$\" | xargs clang-format --style=file -i", "lint": "tslint -c tslint.json src/*.ts src/**/*.ts", - "test": "npm run build && mocha && npm run lint", - "test:unit": "mocha", - "test:watch": "tsc-then -- mocha", + "test": "npm run build && mocha 'lib/test/**/*_test.js' && npm run lint", + "test:unit": "mocha 'lib/test/**/*_test.js'", + "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'", "run-on-polymer": "npm run build && (cd test/integration && bower install --silent) && INTEGRATION_TEST=true mocha lib/test/integration_test.js" }, "repository": { diff --git a/packages/linter/test/mocha.opts b/packages/linter/test/mocha.opts index d91b4b17c..8c6d7ac8e 100644 --- a/packages/linter/test/mocha.opts +++ b/packages/linter/test/mocha.opts @@ -1,4 +1,3 @@ --c --ui tdd +--colors --timeout 5000 -lib/test/*.js lib/test/**/*.js From 44b98abeaf4b909b7bf80ff65b09dca2e767430e Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 15:51:37 -0700 Subject: [PATCH 08/13] Standardized `polyserve` mocha.opts and npm test scripts. --- packages/polyserve/package.json | 6 +++--- packages/polyserve/test/mocha.opts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/polyserve/package.json b/packages/polyserve/package.json index 55d07e1e6..c4842511c 100644 --- a/packages/polyserve/package.json +++ b/packages/polyserve/package.json @@ -12,9 +12,9 @@ "start": "./bin/polyserve", "clean": "rimraf lib", "build": "npm run clean && tsc", - "test": "npm run build && mocha && tslint \"src/**/*.ts\"", - "test:unit": "mocha", - "test:watch": "tsc-then -- mocha -c", + "test": "npm run build && mocha 'lib/test/**/*_test.js' && tslint 'src/**/*.ts'", + "test:unit": "mocha 'lib/test/**/*_test.js'", + "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'", "format": "find src test -iname '*.ts' | xargs clang-format --style=file -i" }, "keywords": [ diff --git a/packages/polyserve/test/mocha.opts b/packages/polyserve/test/mocha.opts index 3a654bee7..64a50a639 100644 --- a/packages/polyserve/test/mocha.opts +++ b/packages/polyserve/test/mocha.opts @@ -1,4 +1,4 @@ --ui tdd +--colors --require source-map-support/register --timeout 5000 -lib/test/*_test.js lib/test/**/*_test.js From 74f491d5f7eee2fa2594cdac9fa2a4391d939a0c Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 15:52:32 -0700 Subject: [PATCH 09/13] Standardized `project-config` mocha.opts and npm test scripts. --- packages/project-config/package.json | 5 +++-- packages/project-config/test/mocha.opts | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 packages/project-config/test/mocha.opts diff --git a/packages/project-config/package.json b/packages/project-config/package.json index a4cc2f3ac..fd7b44d74 100644 --- a/packages/project-config/package.json +++ b/packages/project-config/package.json @@ -16,8 +16,8 @@ "homepage": "https://github.com/Polymer/polymer-project-config#readme", "scripts": { "build": "tsc && typescript-json-schema src/index.ts ProjectOptions --ignoreErrors -o lib/schema.json", - "test": "npm run build && mocha --ui tdd", - "test:unit": "mocha --ui tdd", + "test": "npm run build && mocha 'test/**/*_test.js'", + "test:unit": "mocha 'test/**/*_test.js'", "format": "find src test \\( -iname '*.ts' -o -iname '*.js' \\) | xargs clang-format --style=file -i" }, "dependencies": { @@ -31,6 +31,7 @@ "clang-format": "1.0.49", "mocha": "^3.0.2", "polymer-analyzer": "^3.0.0-pre.22", + "source-map-support": "^0.5.4", "tslint": "^5.9.1", "typescript": "^2.0.2", "typescript-json-schema": "^0.9.0" diff --git a/packages/project-config/test/mocha.opts b/packages/project-config/test/mocha.opts new file mode 100644 index 000000000..64a50a639 --- /dev/null +++ b/packages/project-config/test/mocha.opts @@ -0,0 +1,4 @@ +--ui tdd +--colors +--require source-map-support/register +--timeout 5000 From 491308b0057e10d25f28d5e20a1630c7f6677f88 Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 15:53:52 -0700 Subject: [PATCH 10/13] Standardized `web-component-tester` mocha.opts and npm test scripts. --- packages/web-component-tester/mocha.opts | 4 ++++ packages/web-component-tester/package.json | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 packages/web-component-tester/mocha.opts diff --git a/packages/web-component-tester/mocha.opts b/packages/web-component-tester/mocha.opts new file mode 100644 index 000000000..64a50a639 --- /dev/null +++ b/packages/web-component-tester/mocha.opts @@ -0,0 +1,4 @@ +--ui tdd +--colors +--require source-map-support/register +--timeout 5000 diff --git a/packages/web-component-tester/package.json b/packages/web-component-tester/package.json index 8ff35123b..22a3382b1 100644 --- a/packages/web-component-tester/package.json +++ b/packages/web-component-tester/package.json @@ -49,9 +49,9 @@ "build": "tsc && gulp build", "test": "tsc && gulp test", "prepublishOnly": "gulp prepublish", - "test:unit": "gulp test:unit", - "test:integration": "gulp test:integration", - "test:watch": "watch 'gulp test:unit' runner/ browser/ bin/ test/ tasks/", + "test:unit": "mocha 'test/unit/**/*.js'", + "test:integration": "gulp bower && mocha 'test/integration/**/*.js' --timeout 90000", + "test:watch": "watch \"mocha 'test/unit/**/*.js'\" runner/ browser/ bin/ test/ tasks/", "format": "find runner test | grep '\\.js$\\|\\.ts$' | xargs ./node_modules/.bin/clang-format --style=file -i" }, "dependencies": { @@ -126,6 +126,7 @@ "rimraf": "^2.5.4", "rollup": "^0.25.1", "run-sequence": "^1.0.1", + "source-map-support": "^0.5.4", "tslint": "^5.9.1", "typescript": "^2.1.4", "watch": "^0.18.0", From 615b6fda750d3acfd106029f13489ca30792e0fe Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 16:14:40 -0700 Subject: [PATCH 11/13] Added missing dependency for project-config `source-map-support` and changed ' to \" in scripts for windows support. --- packages/analyzer/package.json | 10 +++++----- packages/build/package.json | 6 +++--- packages/bundler/package.json | 8 ++++---- packages/cli/package.json | 8 ++++---- packages/editor-service/package.json | 8 ++++---- packages/linter/package.json | 6 +++--- packages/polyserve/package.json | 8 ++++---- packages/project-config/package-lock.json | 19 +++++++++++++++++++ packages/project-config/package.json | 8 ++++---- packages/web-component-tester/package.json | 8 ++++---- packages/web-component-tester/test/mocha.opts | 4 ++++ 11 files changed, 58 insertions(+), 35 deletions(-) create mode 100644 packages/web-component-tester/test/mocha.opts diff --git a/packages/analyzer/package.json b/packages/analyzer/package.json index d525e3387..d9c414965 100644 --- a/packages/analyzer/package.json +++ b/packages/analyzer/package.json @@ -23,13 +23,13 @@ "release": "npm run compile", "lint": "gulp lint", "tslint": "tslint -p .", - "test": "npm run clean && npm run build && npm run lint && mocha 'lib/test/**/*_test.js'", - "quicktest": "export QUICK_TESTS=true; npm run build && mocha 'lib/test/**/*_test.js'", + "test": "npm run clean && npm run build && npm run lint && mocha \"lib/test/**/*_test.js\"", + "quicktest": "export QUICK_TESTS=true; npm run build && mocha \"lib/test/**/*_test.js\"", "initBench": "if [ ! -d bower_components ]; then bower install -s -f PolymerElements/app-elements PolymerElements/iron-elements PolymerElements/gold-elements PolymerElements/paper-elements PolymerElements/neon-elements GoogleWebComponents/google-web-components ; fi", "benchmark": "npm run build && npm run initBench && node --expose-gc lib/perf/parse-all-benchmark.js", - "test:unit": "mocha 'lib/test/**/*_test.js'", - "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'", - "format": "find src test | grep '\\.js$\\|\\.ts$' | xargs clang-format --style=file -i", + "test:unit": "mocha \"lib/test/**/*_test.js\"", + "test:watch": "tsc-then -- mocha \"lib/test/**/*_test.js\"", + "format": "find src test | grep \"\\.js$\\|\\.ts$\" | xargs clang-format --style=file -i", "prepublishOnly": "tsc && npm test" }, "devDependencies": { diff --git a/packages/build/package.json b/packages/build/package.json index 3882c51b5..1e2a90ab3 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -8,10 +8,10 @@ "lint": "gulp lint", "build": "gulp build", "test": "gulp lint test", - "test:unit": "mocha 'lib/test/**/*_test.js'", - "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'", + "test:unit": "mocha \"lib/test/**/*_test.js\"", + "test:watch": "tsc-then -- mocha \"lib/test/**/*_test.js\"", "prepublishOnly": "npm test", - "format": "find src/ -iname '*.ts' -o -iname '*.js' | xargs clang-format --style=file -i" + "format": "find src/ -iname \"*.ts\" -o -iname \"*.js\" | xargs clang-format --style=file -i" }, "repository": { "type": "git", diff --git a/packages/bundler/package.json b/packages/bundler/package.json index 7fa5d08b7..b2752719e 100644 --- a/packages/bundler/package.json +++ b/packages/bundler/package.json @@ -55,10 +55,10 @@ }, "scripts": { "build": "tsc", - "format": "find src | grep '\\.js$\\|\\.ts$' | xargs ./node_modules/.bin/clang-format --style=file -i", - "test": "npm run build && tslint -c tslint.json 'src/**/*.ts' && mocha 'lib/test/**/*_test.js'", - "test:unit": "mocha 'lib/test/**/*_test.js'", - "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'" + "format": "find src | grep \"\\.js$\\|\\.ts$\" | xargs ./node_modules/.bin/clang-format --style=file -i", + "test": "npm run build && tslint -c tslint.json \"src/**/*.ts\" && mocha \"lib/test/**/*_test.js\"", + "test:unit": "mocha \"lib/test/**/*_test.js\"", + "test:watch": "tsc-then -- mocha \"lib/test/**/*_test.js\"" }, "author": "The Polymer Project Authors", "license": "BSD-3-Clause", diff --git a/packages/cli/package.json b/packages/cli/package.json index 8b0710858..828376290 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -15,10 +15,10 @@ "test": "gulp test lint", "test:smoke": "gulp test", "test:smoke-lint": "gulp test lint", - "test:integration": "mocha 'lib/test/integration/**/*_test.js'", - "test:unit": "mocha 'lib/test/unit/**/*_test.js'", - "format": "find src gulpfile.js \\( -iname '*.ts' -o -iname '*.js' \\) -not -path '*fixtures*' | xargs clang-format --style=file -i", - "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'" + "test:integration": "mocha \"lib/test/integration/**/*_test.js\"", + "test:unit": "mocha \"lib/test/unit/**/*_test.js\"", + "format": "find src gulpfile.js \\( -iname \"*.ts\" -o -iname \"*.js\" \\) -not -path \"*fixtures*\" | xargs clang-format --style=file -i", + "test:watch": "tsc-then -- mocha \"lib/test/**/*_test.js\"" }, "repository": { "type": "git", diff --git a/packages/editor-service/package.json b/packages/editor-service/package.json index f7cb8c02c..cfb1c21d8 100644 --- a/packages/editor-service/package.json +++ b/packages/editor-service/package.json @@ -17,10 +17,10 @@ "build": "tsc", "prepublishOnly": "npm run clean && npm run build", "lint": "tslint --project ./tsconfig.json", - "test": "npm run clean && npm run build && mocha 'lib/test/**/*_test.js' && npm run lint", - "test:unit": "mocha 'lib/test/**/*_test.js'", - "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'", - "format": "find src test | grep '\\.js$\\|\\.ts$' | xargs ./node_modules/.bin/clang-format --style=file -i" + "test": "npm run clean && npm run build && mocha \"lib/test/**/*_test.js\" && npm run lint", + "test:unit": "mocha \"lib/test/**/*_test.js\"", + "test:watch": "tsc-then -- mocha \"lib/test/**/*_test.js\"", + "format": "find src test | grep \"\\.js$\\|\\.ts$\" | xargs ./node_modules/.bin/clang-format --style=file -i" }, "devDependencies": { "@types/chai": "=4.0.5", diff --git a/packages/linter/package.json b/packages/linter/package.json index 3533e9fe8..25c3c5836 100644 --- a/packages/linter/package.json +++ b/packages/linter/package.json @@ -46,9 +46,9 @@ "clean": "touch lib && rm -rf lib && mkdir lib", "format": "find src | grep \"\\.[jt]s$\" | xargs clang-format --style=file -i", "lint": "tslint -c tslint.json src/*.ts src/**/*.ts", - "test": "npm run build && mocha 'lib/test/**/*_test.js' && npm run lint", - "test:unit": "mocha 'lib/test/**/*_test.js'", - "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'", + "test": "npm run build && mocha \"lib/test/**/*_test.js\" && npm run lint", + "test:unit": "mocha \"lib/test/**/*_test.js\"", + "test:watch": "tsc-then -- mocha \"lib/test/**/*_test.js\"", "run-on-polymer": "npm run build && (cd test/integration && bower install --silent) && INTEGRATION_TEST=true mocha lib/test/integration_test.js" }, "repository": { diff --git a/packages/polyserve/package.json b/packages/polyserve/package.json index c4842511c..cedd8f862 100644 --- a/packages/polyserve/package.json +++ b/packages/polyserve/package.json @@ -12,10 +12,10 @@ "start": "./bin/polyserve", "clean": "rimraf lib", "build": "npm run clean && tsc", - "test": "npm run build && mocha 'lib/test/**/*_test.js' && tslint 'src/**/*.ts'", - "test:unit": "mocha 'lib/test/**/*_test.js'", - "test:watch": "tsc-then -- mocha 'lib/test/**/*_test.js'", - "format": "find src test -iname '*.ts' | xargs clang-format --style=file -i" + "test": "npm run build && mocha \"lib/test/**/*_test.js\" && tslint \"src/**/*.ts\"", + "test:unit": "mocha \"lib/test/**/*_test.js\"", + "test:watch": "tsc-then -- mocha \"lib/test/**/*_test.js\"", + "format": "find src test -iname \"*.ts\" | xargs clang-format --style=file -i" }, "keywords": [ "polymer", diff --git a/packages/project-config/package-lock.json b/packages/project-config/package-lock.json index c6a577905..556b2ae21 100644 --- a/packages/project-config/package-lock.json +++ b/packages/project-config/package-lock.json @@ -91,6 +91,11 @@ "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=" }, + "buffer-from": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", + "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==" + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -720,6 +725,20 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-support": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz", + "integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==", + "requires": { + "buffer-from": "1.0.0", + "source-map": "0.6.1" + } + }, "spdx-correct": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", diff --git a/packages/project-config/package.json b/packages/project-config/package.json index fd7b44d74..98ec8a803 100644 --- a/packages/project-config/package.json +++ b/packages/project-config/package.json @@ -16,9 +16,9 @@ "homepage": "https://github.com/Polymer/polymer-project-config#readme", "scripts": { "build": "tsc && typescript-json-schema src/index.ts ProjectOptions --ignoreErrors -o lib/schema.json", - "test": "npm run build && mocha 'test/**/*_test.js'", - "test:unit": "mocha 'test/**/*_test.js'", - "format": "find src test \\( -iname '*.ts' -o -iname '*.js' \\) | xargs clang-format --style=file -i" + "test": "npm run build && mocha \"test/**/*_test.js\"", + "test:unit": "mocha \"test/**/*_test.js\"", + "format": "find src test \\( -iname \"*.ts\" -o -iname \"*.js\" \\) | xargs clang-format --style=file -i" }, "dependencies": { "@types/node": "^9.6.4", @@ -31,7 +31,7 @@ "clang-format": "1.0.49", "mocha": "^3.0.2", "polymer-analyzer": "^3.0.0-pre.22", - "source-map-support": "^0.5.4", + "source-map-support": "^0.5.5", "tslint": "^5.9.1", "typescript": "^2.0.2", "typescript-json-schema": "^0.9.0" diff --git a/packages/web-component-tester/package.json b/packages/web-component-tester/package.json index 22a3382b1..f5cad9da4 100644 --- a/packages/web-component-tester/package.json +++ b/packages/web-component-tester/package.json @@ -49,10 +49,10 @@ "build": "tsc && gulp build", "test": "tsc && gulp test", "prepublishOnly": "gulp prepublish", - "test:unit": "mocha 'test/unit/**/*.js'", - "test:integration": "gulp bower && mocha 'test/integration/**/*.js' --timeout 90000", - "test:watch": "watch \"mocha 'test/unit/**/*.js'\" runner/ browser/ bin/ test/ tasks/", - "format": "find runner test | grep '\\.js$\\|\\.ts$' | xargs ./node_modules/.bin/clang-format --style=file -i" + "test:unit": "mocha \"test/unit/**/*.js\"", + "test:integration": "gulp bower && mocha \"test/integration/**/*.js\" --timeout 90000", + "test:watch": "watch \"mocha \"test/unit/**/*.js\"\" runner/ browser/ bin/ test/ tasks/", + "format": "find runner test | grep \"\\.js$\\|\\.ts$\" | xargs ./node_modules/.bin/clang-format --style=file -i" }, "dependencies": { "@polymer/sinonjs": "^1.14.1", diff --git a/packages/web-component-tester/test/mocha.opts b/packages/web-component-tester/test/mocha.opts new file mode 100644 index 000000000..64a50a639 --- /dev/null +++ b/packages/web-component-tester/test/mocha.opts @@ -0,0 +1,4 @@ +--ui tdd +--colors +--require source-map-support/register +--timeout 5000 From 867db9e3569df3ed40039800cbae39d3ca5f220c Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 16:23:23 -0700 Subject: [PATCH 12/13] Changes ' to \" in browser-capabilities/package.json for windows support. --- packages/browser-capabilities/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/browser-capabilities/package.json b/packages/browser-capabilities/package.json index 2fc3b977a..f37190755 100644 --- a/packages/browser-capabilities/package.json +++ b/packages/browser-capabilities/package.json @@ -13,9 +13,9 @@ "scripts": { "build": "rm -Rf lib/ && tsc", "build:watch": "tsc --watch", - "format": "find src -name '*.ts' | xargs clang-format --style=file -i", - "test": "npm run build && mocha 'lib/test/**/*_test.js'", - "test:unit": "mocha 'lib/test/**/*_test.js'", + "format": "find src -name \"*.ts\" | xargs clang-format --style=file -i", + "test": "npm run build && mocha \"lib/test/**/*_test.js\"", + "test:unit": "mocha \"lib/test/**/*_test.js\"", "test:watch": "watchy -w src -- npm run test" }, "devDependencies": { From e69be77750e912453b62bd5dec092ff560861758 Mon Sep 17 00:00:00 2001 From: Brendan Baldwin Date: Fri, 27 Apr 2018 16:32:46 -0700 Subject: [PATCH 13/13] Double-escape a double-quote in web-component-tester test:watch. --- packages/web-component-tester/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-component-tester/package.json b/packages/web-component-tester/package.json index f5cad9da4..f97af4e22 100644 --- a/packages/web-component-tester/package.json +++ b/packages/web-component-tester/package.json @@ -51,7 +51,7 @@ "prepublishOnly": "gulp prepublish", "test:unit": "mocha \"test/unit/**/*.js\"", "test:integration": "gulp bower && mocha \"test/integration/**/*.js\" --timeout 90000", - "test:watch": "watch \"mocha \"test/unit/**/*.js\"\" runner/ browser/ bin/ test/ tasks/", + "test:watch": "watch \"mocha \\\"test/unit/**/*.js\\\"\" runner/ browser/ bin/ test/ tasks/", "format": "find runner test | grep \"\\.js$\\|\\.ts$\" | xargs ./node_modules/.bin/clang-format --style=file -i" }, "dependencies": {