forked from mgechev/angular-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mgechev#1232 from mgechev/testing
feat(build): improve testing
- Loading branch information
Showing
10 changed files
with
57 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,4 @@ export = () => { | |
.pipe(plugins.sourcemaps.write()) | ||
.pipe(gulp.dest(APP_DEST)); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { startKarma } from '../../utils/seed/karma.start'; | ||
/** | ||
* Executes the build process, running all unit tests using `karma`. | ||
*/ | ||
export = (done: any) => { | ||
return startKarma(done, { | ||
preprocessors: { | ||
'dist/**/!(*spec).js': ['coverage'] | ||
}, | ||
reporters: ['mocha', 'coverage'], | ||
coverageReporter: { | ||
dir: 'coverage/', | ||
reporters: [ | ||
{ type: 'json', subdir: '.', file: 'coverage-final.json' } | ||
] | ||
}, | ||
}); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { startKarma } from '../../utils/seed/karma.start'; | ||
/** | ||
* Executes the build process, running all unit tests using `karma`. | ||
*/ | ||
export = (done: any) => { | ||
return startKarma(done, { | ||
singleRun: false | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as karma from 'karma'; | ||
import { join } from 'path'; | ||
|
||
export const startKarma = (done: any, config: any = {}) => { | ||
return new (<any>karma).Server(Object.assign({ | ||
configFile: join(process.cwd(), 'karma.conf.js'), | ||
singleRun: true | ||
}, config)).start(done); | ||
}; | ||
|