@@ -14,7 +14,7 @@ var rename = require('gulp-rename'),
1414 paths = require ( './paths' ) ,
1515 webpack = require ( 'webpack-stream' ) ,
1616 webpackConfig = require ( './webpack.config' ) ,
17- webpackConfigE2E = require ( './webpack.e2e .config' ) ,
17+ webpackTestConfig = require ( './webpack.test .config' ) ,
1818 runSequence = require ( 'run-sequence' ) ,
1919 argv = require ( 'yargs' ) . argv ;
2020 ;
@@ -33,21 +33,12 @@ gulp.task('lint', 'Lints all files', function (done) {
3333
3434gulp . task ( 'test' , 'Runs all tests' , function ( done ) {
3535 runSequence (
36- [ 'compile:ts' , 'compile:spec' ] ,
37- [ 'min:js' ] ,
36+ 'compile:spec' ,
3837 'test:js' ,
3938 done
4039 ) ;
4140} ) ;
4241
43- gulp . task ( 'teste2e' , 'Runs e2e tests' , function ( done ) {
44- runSequence (
45- 'compile:e2e' ,
46- 'test:e2e' ,
47- done
48- ) ;
49- } ) ;
50-
5142gulp . task ( 'build' , 'Runs a full build' , function ( done ) {
5243 runSequence (
5344 'lint' ,
@@ -77,14 +68,6 @@ gulp.task('min:js', 'Creates minified JavaScript file', function() {
7768 . pipe ( gulp . dest ( paths . jsDest ) ) ;
7869} ) ;
7970
80- gulp . task ( 'test:js' , 'Runs unit tests' , function ( done ) {
81- new karma . Server . start ( {
82- configFile : __dirname + '/karma.conf.js' ,
83- singleRun : argv . debug ? false : true ,
84- captureTimeout : argv . timeout || 60000
85- } , done ) ;
86- } ) ;
87-
8871gulp . task ( 'compile:ts' , 'Compile typescript for powerbi library' , function ( ) {
8972 return gulp . src ( [ './src/powerbi.ts' ] )
9073 . pipe ( webpack ( webpackConfig ) )
@@ -104,27 +87,15 @@ gulp.task('compile:dts', 'Generate single dts file from modules', function (done
10487 . pipe ( gulp . dest ( 'dist/' ) ) ;
10588} ) ;
10689
107- gulp . task ( 'compile:spec' , 'Compile typescript for tests' , function ( ) {
108- var tsProject = ts . createProject ( 'tsconfig.json' ) ;
109-
110- var tsResult = gulp . src ( [ './typings/global/**/*.d.ts' , './test/core.spec.ts' , './test/embed.spec.ts' ] )
111- . pipe ( ts ( tsProject ) )
112- ;
113-
114- return tsResult . js
115- . pipe ( flatten ( ) )
90+ gulp . task ( 'compile:spec' , 'Compile spec tests' , function ( ) {
91+ return gulp . src ( [ './test/test.spec.ts' ] )
92+ . pipe ( webpack ( webpackTestConfig ) )
11693 . pipe ( gulp . dest ( './tmp' ) ) ;
11794} ) ;
11895
119- gulp . task ( 'compile:e2e' , 'Compile End-to-End tests' , function ( ) {
120- return gulp . src ( [ './e2e/protocol.e2e.spec.ts' ] )
121- . pipe ( webpack ( webpackConfigE2E ) )
122- . pipe ( gulp . dest ( './tmpe2e' ) ) ;
123- } ) ;
124-
125- gulp . task ( 'test:e2e' , 'Run End-to-End tests' , function ( done ) {
96+ gulp . task ( 'test:js' , 'Run js tests' , function ( done ) {
12697 new karma . Server . start ( {
127- configFile : __dirname + '/karma.e2e. conf.js' ,
98+ configFile : __dirname + '/karma.conf.js' ,
12899 singleRun : argv . debug ? false : true ,
129100 captureTimeout : argv . timeout || 60000
130101 } , done ) ;
0 commit comments