Skip to content

Commit

Permalink
Run clean before unit-test, rename clean-test to clean-e2e as that's …
Browse files Browse the repository at this point in the history
…all we use it for these days
  • Loading branch information
lathonez committed Jul 11, 2016
1 parent 0d3f50e commit 1f25717
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="1.9.1"></a>
# 1.9.1 (2016-07-11)

### Bug Fixes

* **Unit Test**: Make sure we're cleaning before running unit tests [#86](https://github.com/lathonez/clicker/issues/86) ([](https://github.com/lathonez/clicker/commit/))

<a name="1.9.0"></a>
# 1.9.0 (2016-07-10)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"typings": "1.3.1"
},
"name": "clicker",
"version": "1.9.0",
"version": "1.9.1",
"description": "clicker: An Ionic project",
"cordovaPlugins": [
"cordova-plugin-device",
Expand Down
8 changes: 5 additions & 3 deletions test/gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gulp.task('build-app', (done: Function) => {
});

// compile E2E typescript into individual files, project directoy structure is replicated under www/build/test
gulp.task('build-e2e', ['clean-test'], () => {
gulp.task('build-e2e', ['clean-e2e'], () => {
let typescript: any = require('gulp-typescript');
let tsProject: any = typescript.createProject('tsconfig.json');
let src: Array<any> = [
Expand All @@ -40,8 +40,9 @@ gulp.task('build-e2e', ['clean-test'], () => {
.pipe(gulp.dest(config.testDest));
});

// delete everything used in our test cycle here
gulp.task('clean-test', () => {
// delete _only_ tests generated on e2e.
// If we delete everything (using Ionic's `clean` task we'll wipe the newly built app we're testing against)
gulp.task('clean-e2e', () => {

let del: any = require('del');

Expand Down Expand Up @@ -90,6 +91,7 @@ gulp.task('lint', () => {
// build unit tests, run unit tests, remap and report coverage
gulp.task('unit-test', (done: Function) => {
runSequence(
['clean'], // Ionic's clean task, nukes the whole of www/build
['lint', 'html'],
'karma',
(<any>done)
Expand Down

0 comments on commit 1f25717

Please sign in to comment.