Don't build when executing test:unit or test:integration#153
Don't build when executing test:unit or test:integration#153
Conversation
…o we can run tests without re-building everything on CI.
packages/editor-service/package.json
Outdated
| "test:watch": "tsc-then -- mocha", | ||
| "test": "npm run clean && npm run build && npm run test:unit && npm run lint", | ||
| "test:unit": "mocha", | ||
| "test:watch": "tsc-then -- npm run test:unit", |
There was a problem hiding this comment.
running mocha directly is generally better in test:watch, because if there's a failure when doing npm run foo then npm outputs like 20-30 lines about how the failure isn't npm's fault
packages/linter/package.json
Outdated
| "test:watch": "tsc-then -- mocha", | ||
| "test": "npm run build && npm run test:unit && npm run lint", | ||
| "test:unit": "mocha", | ||
| "test:watch": "tsc-then -- npm run test:unit", |
There was a problem hiding this comment.
prefer just tsc-then -- mocha
There was a problem hiding this comment.
I've changed all npm run test:unit inside of npm scripts to mocha where appropriate.
| gulp.task('test', ['build'], function() { | ||
| gulp.task('test', ['build', 'test:unit']); | ||
|
|
||
| gulp.task('test:unit', function() { |
There was a problem hiding this comment.
Looks like build is missing a corresponding change to its package.json?
There was a problem hiding this comment.
Good catch. Added
| "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" |
|
Note: I put the |
…utput, and add test:unit script for build.
Install steps already run build tasks and all package 'test' scripts also run build tasks, so travis is spending a lot of time unnecessarily running build tasks. Attempt to solve this by adding
test:unitnpm scripts to all packages and explicitly run those scripts instead.Also removed the build gulp task dependencies on test:unit or test:integration where found.