HaNdTriX / generator-chrome-extension-kickstart

Scaffold out a Web Extension http://yeoman.io
MIT License
239 stars 33 forks source link

Testing framework #14

Open AleksueiR opened 8 years ago

AleksueiR commented 8 years ago

Is it possible to add a testing framework to the generator? Thank you.

HaNdTriX commented 7 years ago

Yes it is. I haven't added it to the boilerplate yet, because there are so many different ways to do your tests.

Just create a test.js file in the tasks directory (./tasks/test.js). This will get automatically loaded via gulp.

import gulp from 'gulp';
import livereload from 'gulp-livereload';
import args from './lib/args';

gulp.task('test', () => {
  return gulp.src('./test/index.js')
    ...
    .pipe(gulpif(args.watch, livereload()));
});

(Replace ... with your own config)

More Info: