@@ -9,7 +9,7 @@ const configEntryAsFunction = require('./../../fixtures/entry-as-function/webpac
99const normalize = ( entry ) => entry . split ( path . sep ) . join ( '/' ) ;
1010
1111describe ( 'addEntries util' , ( ) => {
12- it ( 'should adds devServer entry points to a single entry point' , ( ) => {
12+ it ( 'should add devServer entry points to a single entry point' , ( ) => {
1313 const webpackOptions = Object . assign ( { } , config ) ;
1414
1515 addEntries ( webpackOptions , { } ) ;
@@ -21,7 +21,7 @@ describe('addEntries util', () => {
2121 expect ( normalize ( webpackOptions . entry [ 1 ] ) ) . toEqual ( './foo.js' ) ;
2222 } ) ;
2323
24- it ( 'should adds devServer entry points to a multi-module entry point' , ( ) => {
24+ it ( 'should add devServer entry points to a multi-module entry point' , ( ) => {
2525 const webpackOptions = Object . assign ( { } , config , {
2626 entry : [ './foo.js' , './bar.js' ] ,
2727 } ) ;
@@ -36,7 +36,7 @@ describe('addEntries util', () => {
3636 expect ( webpackOptions . entry [ 2 ] ) . toEqual ( './bar.js' ) ;
3737 } ) ;
3838
39- it ( 'should adds devServer entry points to a multi entry point object' , ( ) => {
39+ it ( 'should add devServer entry points to a multi entry point object' , ( ) => {
4040 const webpackOptions = Object . assign ( { } , config , {
4141 entry : {
4242 foo : './foo.js' ,
@@ -64,7 +64,7 @@ describe('addEntries util', () => {
6464 expect ( webpackOptions . entry [ 1 ] ) . toEqual ( './src' ) ;
6565 } ) ;
6666
67- it ( 'should preserves dynamic entry points' , async ( ) => {
67+ it ( 'should preserve dynamic entry points' , async ( ) => {
6868 let i = 0 ;
6969 const webpackOptions = {
7070 // simulate dynamic entry
@@ -92,7 +92,7 @@ describe('addEntries util', () => {
9292 }
9393 } ) ;
9494
95- it ( 'should preserves asynchronous dynamic entry points' , async ( ) => {
95+ it ( 'should preserve asynchronous dynamic entry points' , async ( ) => {
9696 let i = 0 ;
9797 const webpackOptions = {
9898 // simulate async dynamic entry
@@ -121,7 +121,7 @@ describe('addEntries util', () => {
121121 }
122122 } ) ;
123123
124- it ( "should prepends webpack's hot reload client script" , ( ) => {
124+ it ( "should prepend webpack's hot reload client script" , ( ) => {
125125 const webpackOptions = Object . assign ( { } , config , {
126126 entry : {
127127 app : './app.js' ,
@@ -138,7 +138,7 @@ describe('addEntries util', () => {
138138 expect ( hotClientScript ) . toEqual ( require . resolve ( hotClientScript ) ) ;
139139 } ) ;
140140
141- it ( "should prepends webpack's hot only client script" , ( ) => {
141+ it ( "should prepend webpack's hot only client script" , ( ) => {
142142 const webpackOptions = Object . assign ( { } , config , {
143143 entry : {
144144 app : './app.js' ,
@@ -155,23 +155,23 @@ describe('addEntries util', () => {
155155 expect ( hotClientScript ) . toEqual ( require . resolve ( hotClientScript ) ) ;
156156 } ) ;
157157
158- it ( " should doesn't add the HMR plugin if not hot and no plugins" , ( ) => {
158+ it ( ' should not add the HMR plugin if not hot and no plugins' , ( ) => {
159159 const webpackOptions = Object . assign ( { } , config ) ;
160160
161161 addEntries ( webpackOptions , { } ) ;
162162
163163 expect ( 'plugins' in webpackOptions ) . toBeFalsy ( ) ;
164164 } ) ;
165165
166- it ( " should doesn't add the HMR plugin if not hot and empty plugins" , ( ) => {
166+ it ( ' should not add the HMR plugin if not hot and empty plugins' , ( ) => {
167167 const webpackOptions = Object . assign ( { } , config , { plugins : [ ] } ) ;
168168
169169 addEntries ( webpackOptions , { } ) ;
170170
171171 expect ( webpackOptions . plugins ) . toEqual ( [ ] ) ;
172172 } ) ;
173173
174- it ( " should doesn't add the HMR plugin if not hot and some plugins" , ( ) => {
174+ it ( ' should not add the HMR plugin if not hot and some plugins' , ( ) => {
175175 const existingPlugin1 = new webpack . BannerPlugin ( 'happy birthday' ) ;
176176 const existingPlugin2 = new webpack . DefinePlugin ( { foo : 'bar' } ) ;
177177 const webpackOptions = Object . assign ( { } , config , {
@@ -183,7 +183,7 @@ describe('addEntries util', () => {
183183 expect ( webpackOptions . plugins ) . toEqual ( [ existingPlugin1 , existingPlugin2 ] ) ;
184184 } ) ;
185185
186- it ( 'should adds the HMR plugin if hot' , ( ) => {
186+ it ( 'should add the HMR plugin if hot' , ( ) => {
187187 const existingPlugin = new webpack . BannerPlugin ( 'bruce' ) ;
188188 const webpackOptions = Object . assign ( { } , config , {
189189 plugins : [ existingPlugin ] ,
@@ -197,7 +197,7 @@ describe('addEntries util', () => {
197197 ] ) ;
198198 } ) ;
199199
200- it ( 'should adds the HMR plugin if hot-only' , ( ) => {
200+ it ( 'should add the HMR plugin if hot-only' , ( ) => {
201201 const webpackOptions = Object . assign ( { } , config ) ;
202202
203203 addEntries ( webpackOptions , { hot : 'only' } ) ;
@@ -207,7 +207,7 @@ describe('addEntries util', () => {
207207 ] ) ;
208208 } ) ;
209209
210- it ( "should doesn't add the HMR plugin again if it's already there" , ( ) => {
210+ it ( "should not add the HMR plugin again if it's already there" , ( ) => {
211211 const existingPlugin = new webpack . BannerPlugin ( 'bruce' ) ;
212212 const webpackOptions = Object . assign ( { } , config , {
213213 plugins : [ new webpack . HotModuleReplacementPlugin ( ) , existingPlugin ] ,
@@ -240,7 +240,7 @@ describe('addEntries util', () => {
240240 ] ) ;
241241 } ) ;
242242
243- it ( 'should can prevent duplicate entries from successive calls' , ( ) => {
243+ it ( 'should prevent duplicate entries from successive calls' , ( ) => {
244244 const webpackOptions = Object . assign ( { } , config ) ;
245245
246246 addEntries ( webpackOptions , { hot : true } ) ;
@@ -254,15 +254,15 @@ describe('addEntries util', () => {
254254 expect ( result . length ) . toEqual ( 1 ) ;
255255 } ) ;
256256
257- it ( 'should supports entry as Function' , ( ) => {
257+ it ( 'should support entry as Function' , ( ) => {
258258 const webpackOptions = Object . assign ( { } , configEntryAsFunction ) ;
259259
260260 addEntries ( webpackOptions , { } ) ;
261261
262262 expect ( typeof webpackOptions . entry === 'function' ) . toBe ( true ) ;
263263 } ) ;
264264
265- it ( 'should only prepends devServer entry points to web targets by default' , ( ) => {
265+ it ( 'should only prepend devServer entry points to web targets by default' , ( ) => {
266266 const webpackOptions = [
267267 Object . assign ( { } , config ) ,
268268 Object . assign ( { target : 'web' } , config ) ,
@@ -292,7 +292,7 @@ describe('addEntries util', () => {
292292 } ) ;
293293 } ) ;
294294
295- it ( 'should allows selecting compilations to inline the client into' , ( ) => {
295+ it ( 'should allow selecting compilations to inline the client into' , ( ) => {
296296 const webpackOptions = [
297297 Object . assign ( { } , config ) ,
298298 Object . assign ( { target : 'web' } , config ) ,
@@ -322,7 +322,7 @@ describe('addEntries util', () => {
322322 } ) ;
323323 } ) ;
324324
325- it ( 'should prepends the hot runtime to all targets by default (when hot)' , ( ) => {
325+ it ( 'should prepend the hot runtime to all targets by default (when hot)' , ( ) => {
326326 const webpackOptions = [
327327 Object . assign ( { target : 'web' } , config ) ,
328328 Object . assign ( { target : 'node' } , config ) ,
@@ -347,7 +347,7 @@ describe('addEntries util', () => {
347347 } ) ;
348348 } ) ;
349349
350- it ( 'should allows selecting which compilations to inject the hot runtime into' , ( ) => {
350+ it ( 'should allow selecting which compilations to inject the hot runtime into' , ( ) => {
351351 const webpackOptions = [
352352 Object . assign ( { target : 'web' } , config ) ,
353353 Object . assign ( { target : 'node' } , config ) ,
@@ -359,7 +359,7 @@ describe('addEntries util', () => {
359359 } ) ;
360360
361361 // node target should have the client runtime but not the hot runtime
362- const webWebpackOptions = webpackOptions [ 0 ] ;
362+ const [ webWebpackOptions , nodeWebpackOptions ] = webpackOptions ;
363363
364364 expect ( webWebpackOptions . entry . length ) . toEqual ( 2 ) ;
365365
@@ -369,9 +369,6 @@ describe('addEntries util', () => {
369369
370370 expect ( normalize ( webWebpackOptions . entry [ 1 ] ) ) . toEqual ( './foo.js' ) ;
371371
372- // node target should have the hot runtime but not the client runtime
373- const nodeWebpackOptions = webpackOptions [ 1 ] ;
374-
375372 expect ( nodeWebpackOptions . entry . length ) . toEqual ( 2 ) ;
376373
377374 expect (
0 commit comments