1- var should = require ( "should" ) ;
2- var path = require ( "path" ) ;
1+ "use strict" ;
32
4- var webpack = require ( "../lib/webpack" ) ;
3+ const should = require ( "should" ) ;
4+ const path = require ( "path" ) ;
5+
6+ const webpack = require ( "../lib/webpack" ) ;
57
68describe ( "Integration" , function ( ) {
79 this . timeout ( 5000 ) ;
8- it ( "should compile library1" , function ( done ) {
10+ it ( "should compile library1" , ( done ) => {
911 webpack ( {
1012 entry : "library1" ,
1113 bail : true ,
@@ -16,14 +18,14 @@ describe("Integration", function() {
1618 filename : "library1.js" ,
1719 library : "library1"
1820 }
19- } , function ( err , stats ) {
21+ } , ( err , stats ) => {
2022 if ( err ) throw err ;
2123 stats . hasErrors ( ) . should . be . not . ok ( ) ;
2224 stats . hasWarnings ( ) . should . be . not . ok ( ) ;
2325 done ( ) ;
2426 } ) ;
2527 } ) ;
26- it ( "should compile library2" , function ( done ) {
28+ it ( "should compile library2" , ( done ) => {
2729 webpack ( {
2830 entry : "library2" ,
2931 context : path . join ( __dirname , "browsertest" ) ,
@@ -74,17 +76,15 @@ describe("Integration", function() {
7476 }
7577 } ) ,
7678 function ( ) {
77- this . plugin ( "normal-module-factory" , function ( nmf ) {
78- nmf . plugin ( "after-resolve" , function ( data , callback ) {
79+ this . plugin ( "normal-module-factory" , ( nmf ) => {
80+ nmf . plugin ( "after-resolve" , ( data , callback ) => {
7981 data . resource = data . resource . replace ( / e x t r a \. j s / , "extra2.js" ) ;
80- setTimeout ( function ( ) {
81- callback ( null , data ) ;
82- } , 50 ) ;
82+ setTimeout ( ( ) => callback ( null , data ) , 50 ) ;
8383 } ) ;
8484 } ) ;
8585 }
8686 ]
87- } , function ( err , stats ) {
87+ } , ( err , stats ) => {
8888 if ( err ) throw err ;
8989 stats . hasErrors ( ) . should . be . not . ok ( ) ;
9090 stats . hasWarnings ( ) . should . be . not . ok ( ) ;
0 commit comments