Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ addons:
- google-chrome-stable

env:
- TEST_COMMAND=test
- TEST_COMMAND="run test:unit"
- TEST_COMMAND="run test:integration"

language: node_js
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ install:
test_script:
- node --version
- npm --version
- npm run test:windows
- npm run test:unit:windows
- npm run test:integration:windows

# Don't actually build.
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
},
"scripts": {
"bootstrap": "lerna bootstrap",
"build": "lerna run build",
"test": "lerna run test",
"test:windows": "lerna run test --ignore polyserve",
"test:integration": "lerna run test:integration",
"test:integration:windows": "lerna run test:integration"
"build": "lerna run build --stream",
"test": "npm run build && npm run test:unit",
"test:integration": "lerna run test:integration --stream",
"test:integration:windows": "lerna run test:integration --stream",
"test:unit": "lerna run test:unit --stream",
"test:unit:windows": "lerna run test:unit --stream --ignore polyserve"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to --stream, nice catch

},
"devDependencies": {
"lerna": "^2.10.1"
Expand Down
1 change: 1 addition & 0 deletions packages/analyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"quicktest": "export QUICK_TESTS=true; npm run build && mocha",
"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",
"format": "find src test | grep '\\.js$\\|\\.ts$' | xargs clang-format --style=file -i",
"prepublishOnly": "tsc && npm test"
Expand Down
1 change: 1 addition & 0 deletions packages/browser-capabilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"build:watch": "tsc --watch",
"format": "find src -name '*.ts' | xargs clang-format --style=file -i",
"test": "npm run build && mocha",
"test:unit": "mocha",
"test:watch": "watchy -w src -- npm run test"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/build/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ gulp.task('compile', () => {
.pipe(gulp.dest('lib'));
});

gulp.task('test', ['build'], function() {
gulp.task('test', ['build', 'test:unit']);

gulp.task('test:unit', function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like build is missing a corresponding change to its package.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Added

return gulp.src('lib/test/**/*_test.js', {read: false}).pipe(mocha({
ui: 'tdd',
reporter: 'spec',
Expand Down
1 change: 1 addition & 0 deletions packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"lint": "gulp lint",
"build": "gulp build",
"test": "gulp lint test",
"test:unit": "gulp test:unit",
"test:watch": "tsc-then -- mocha -c",
"prepublishOnly": "npm test",
"format": "find src/ -iname '*.ts' -o -iname '*.js' | xargs clang-format --style=file -i"
Expand Down
3 changes: 2 additions & 1 deletion packages/bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,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",
"format": "find src | grep '\\.js$\\|\\.ts$' | xargs ./node_modules/.bin/clang-format --style=file -i"
"test:unit": "mocha"
},
"author": "The Polymer Project Authors",
"license": "BSD-3-Clause",
Expand Down
16 changes: 8 additions & 8 deletions packages/cli/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ gulp.task('compile', () => {

gulp.task('copy', () => gulp.src(['src/**/.gitignore']).pipe(gulp.dest('lib')));

gulp.task(
'test',
['build'],
() => gulp.src('lib/test/unit/**/*_test.js', {read: false}).pipe(mocha({
ui: 'tdd',
reporter: 'spec',
})));
gulp.task('test', ['build', 'test:unit']);

gulp.task(
'test:integration',
['build'],
() => gulp.src(['lib/test/integration/**/*_test.js'], {read: false})
.pipe(mocha({
ui: 'tdd',
reporter: 'spec',
})));

gulp.task(
'test:unit',
() => gulp.src('lib/test/unit/**/*_test.js', {read: false}).pipe(mocha({
ui: 'tdd',
reporter: 'spec',
})));

gulp.task(
'tslint',
() => gulp.src('src/**/*.ts')
Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"test:smoke": "gulp test",
"test:smoke-lint": "gulp test lint",
"test:integration": "gulp test:integration",
"test:unit": "gulp test:unit",
"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"
},
Expand Down
16 changes: 12 additions & 4 deletions packages/common/gulp-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,21 @@ module.exports.buildAll = function(options) {
module.exports.test = function(options) {
module.exports.buildAll(options);

task('test', ['build'], () =>
gulp.src(['test/**/*_test.js', 'src/test/**/*_test.js'], {read: false})
task('test', ['build', 'test:unit', 'test:integration']);

task('test:integration', () =>
gulp.src(['lib/test/integration/**/*_test.js'], {read: false})
.pipe(mocha({
ui: 'tdd',
reporter: 'spec',
}))
);
})));

task('test:unit', () =>
gulp.src(['lib/test/unit/**/*_test.js'], {read: false})
.pipe(mocha({
ui: 'tdd',
reporter: 'spec',
})));
}

module.exports.generateCompleteTaskgraph = function(options) {
Expand Down
1 change: 1 addition & 0 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"init": "gulp init",
"build": "gulp build",
"test": "gulp test",
"test:unit": "gulp test:unit",
"prepublishOnly": "gulp build-all",
"format": "find src/ test/ -iname '*.ts' -o -iname '*.js' | xargs clang-format --style=file -i"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/common/package.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": "gulp build --silent",
"release": "npm run compile",
"lint": "gulp lint",
"test": "npm run clean && npm run build && npm run lint && mocha",
"test": "npm run clean && npm run build && npm run lint && npm run test:unit",
"test:unit": "mocha",
"test:watch": "watchy -w src/ -- npm test --loglevel=silent",
"format": "find src test | grep '\\.js$\\|\\.ts$' | xargs ./node_modules/.bin/clang-format --style=file -i",
"prepublish": "tsc && npm test"
Expand Down
1 change: 1 addition & 0 deletions packages/editor-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"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",
"format": "find src test | grep '\\.js$\\|\\.ts$' | xargs ./node_modules/.bin/clang-format --style=file -i"
},
Expand Down
1 change: 1 addition & 0 deletions packages/linter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"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",
"run-on-polymer": "npm run build && (cd test/integration && bower install --silent) && INTEGRATION_TEST=true mocha lib/test/integration_test.js"
},
Expand Down
1 change: 1 addition & 0 deletions packages/polyserve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"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",
"format": "find src test -iname '*.ts' | xargs clang-format --style=file -i"
},
Expand Down
1 change: 1 addition & 0 deletions packages/project-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"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",
"format": "find src test \\( -iname '*.ts' -o -iname '*.js' \\) | xargs clang-format --style=file -i"
},
"dependencies": {
Expand Down