Skip to content

Commit

Permalink
Add test-app-watch npm cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Dec 13, 2015
1 parent c76b383 commit ce7d849
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -110,11 +110,12 @@ npm run compress

```bash
# test/app
npm run test:app
npm run test-app
npm run test-app-watch # watch files
# test/e2e
npm run build
npm run test:e2e
# lint & test:app & build & test:e2e
npm run test-e2e
# lint & test-app & build & test-e2e
npm test
```

Expand Down
8 changes: 6 additions & 2 deletions gulpfile.babel.js
Expand Up @@ -147,13 +147,17 @@ gulp.task('lint', () => {

gulp.task('app:test', () => {
return gulp.src('./test/app/**/*.spec.js')
.pipe(mocha({ require: ['./test/setup-app'] }));
.pipe(mocha({ require: [ './test/setup-app' ] }));
});

gulp.task('watch:app:test', [ 'app:test' ], () => {
return gulp.watch([ 'test/app/**/*.spec.js', 'app/**/*.js' ], [ 'app:test' ]);
});

gulp.task('e2e:test', () => {
crdv.start();
return gulp.src('./test/e2e/**/*.js')
.pipe(mocha({ require: ['co-mocha'] }))
.pipe(mocha({ require: [ 'co-mocha' ] }))
.on('end', () => crdv.stop());
});

Expand Down
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -8,8 +8,9 @@
"compress": "gulp compress",
"clean": "rimraf build/ dev/ *.zip *.crx",
"lint": "gulp lint",
"test:app": "gulp app:test",
"test:e2e": "gulp e2e:test",
"test-app": "gulp app:test",
"test-app-watch": "gulp watch:app:test",
"test-e2e": "gulp e2e:test",
"test": "gulp test"
},
"repository": {
Expand Down

0 comments on commit ce7d849

Please sign in to comment.