@@ -14,7 +14,7 @@ jest.mock('execa')
14
14
const execaMock = ( execa as unknown ) as jest . Mock
15
15
const execaOnMock = jest . fn ( )
16
16
const laravelMock = jest . fn ( ) . mockReturnValue ( {
17
- on : execaOnMock
17
+ on : execaOnMock ,
18
18
} )
19
19
execaMock . mockImplementation ( ( program : string , params : string [ ] ) => {
20
20
if ( program === 'php' && params [ 0 ] && params [ 0 ] === 'artisan' )
@@ -100,8 +100,8 @@ describe('module tests', () => {
100
100
...options ,
101
101
laravel : {
102
102
root : laravelRoot ,
103
- ...( options && options . laravel )
104
- }
103
+ ...( options && options . laravel ) ,
104
+ } ,
105
105
} )
106
106
)
107
107
) . nuxt
@@ -110,12 +110,12 @@ describe('module tests', () => {
110
110
const testProxy = ( proxy : any , host = 'http://localhost:3001' ) => {
111
111
expect ( proxy ) . toBeDefined ( )
112
112
expect ( proxy ) . toContainEqual ( [
113
- [ '**/* ' , `!/${ moduleKey } ` , '!/_loading' ] ,
113
+ [ '**' , `!/${ moduleKey } ` , '!/_loading/** ' ] ,
114
114
{
115
115
target : host ,
116
116
ws : false ,
117
- logLevel : 'debug'
118
- }
117
+ logLevel : 'debug' ,
118
+ } ,
119
119
] )
120
120
}
121
121
@@ -132,7 +132,7 @@ describe('module tests', () => {
132
132
port : 3001 ,
133
133
origin : 'http://localhost:3000' ,
134
134
path : moduleKey ,
135
- ...overrides
135
+ ...overrides ,
136
136
}
137
137
expect ( execaMock ) . toHaveBeenCalledTimes ( 1 )
138
138
expect ( execaMock ) . toHaveBeenCalledWith (
@@ -142,8 +142,8 @@ describe('module tests', () => {
142
142
cwd : laravelRoot ,
143
143
env : expect . objectContaining ( {
144
144
[ laravelAppEnv ] : config . origin ,
145
- [ nuxtOutputEnv ] : `${ config . origin } /${ moduleKey } `
146
- } )
145
+ [ nuxtOutputEnv ] : `${ config . origin } /${ moduleKey } ` ,
146
+ } ) ,
147
147
} )
148
148
)
149
149
expect ( execaOnMock ) . toHaveBeenCalledTimes ( 1 )
@@ -174,9 +174,9 @@ describe('module tests', () => {
174
174
root : laravelRoot ,
175
175
server : {
176
176
host : 'host.test' ,
177
- port : 8080
178
- }
179
- }
177
+ port : 8080 ,
178
+ } ,
179
+ } ,
180
180
} )
181
181
)
182
182
) . nuxt
@@ -219,7 +219,7 @@ describe('module tests', () => {
219
219
expect . objectContaining ( {
220
220
name : moduleKey ,
221
221
path : `/${ moduleKey } ` ,
222
- component : expect . stringMatching ( / i n d e x \. v u e $ / )
222
+ component : expect . stringMatching ( / i n d e x \. v u e $ / ) ,
223
223
} )
224
224
)
225
225
} )
@@ -253,7 +253,7 @@ describe('module tests', () => {
253
253
const testHost = 'host.test'
254
254
const testPort = 3000
255
255
await setNuxt ( {
256
- laravel : { server : { host : testHost , port : testPort } }
256
+ laravel : { server : { host : testHost , port : testPort } } ,
257
257
} )
258
258
259
259
testProxy ( nuxt . options . proxy , `http://${ testHost } :${ testPort } ` )
@@ -274,7 +274,7 @@ describe('module tests', () => {
274
274
testProxy ( nuxt . options . proxy , `http://localhost:${ nuxtPort + 1 } ` )
275
275
testServer ( {
276
276
port : nuxtPort + 1 ,
277
- origin : `http://localhost:${ nuxtPort } `
277
+ origin : `http://localhost:${ nuxtPort } ` ,
278
278
} )
279
279
} , 60000 )
280
280
@@ -322,8 +322,8 @@ describe('module tests', () => {
322
322
...options ,
323
323
laravel : {
324
324
root : laravelRoot ,
325
- ...( options && options . laravel )
326
- }
325
+ ...( options && options . laravel ) ,
326
+ } ,
327
327
} )
328
328
)
329
329
) . nuxt
@@ -373,7 +373,7 @@ describe('module tests', () => {
373
373
expect . objectContaining ( {
374
374
dir : `${ laravelRoot } /${ moduleKey } ` ,
375
375
exclude : [ / .* / ] ,
376
- fallback : 'spa.html'
376
+ fallback : 'spa.html' ,
377
377
} )
378
378
)
379
379
expect ( infoSpy ) . toHaveBeenNthCalledWith (
@@ -416,7 +416,7 @@ describe('module tests', () => {
416
416
expect . objectContaining ( {
417
417
dir : `${ laravelRoot } /${ moduleKey } ` ,
418
418
exclude : [ / .* / ] ,
419
- fallback : outName
419
+ fallback : outName ,
420
420
} )
421
421
)
422
422
expect ( infoSpy ) . toHaveBeenNthCalledWith (
@@ -447,16 +447,16 @@ describe('module tests', () => {
447
447
448
448
expect ( nuxt . options . generate ) . toEqual (
449
449
expect . objectContaining ( {
450
- fallback : 'index.html'
450
+ fallback : 'index.html' ,
451
451
} )
452
452
)
453
453
} , 60000 )
454
454
455
455
test ( 'additional output file' , async ( ) => {
456
456
await nuxtSetup ( {
457
457
laravel : {
458
- outputPath : 'storage/spa.html'
459
- }
458
+ outputPath : 'storage/spa.html' ,
459
+ } ,
460
460
} )
461
461
462
462
expect ( infoSpy ) . toHaveBeenNthCalledWith (
@@ -561,8 +561,8 @@ describe('module tests', () => {
561
561
test ( 'additional output is skipped if it corresponds to default output' , async ( ) => {
562
562
await nuxtSetup ( {
563
563
laravel : {
564
- outputPath : 'public/spa.html'
565
- }
564
+ outputPath : 'public/spa.html' ,
565
+ } ,
566
566
} )
567
567
568
568
expect ( infoSpy ) . toHaveBeenNthCalledWith (
@@ -584,8 +584,8 @@ describe('module tests', () => {
584
584
585
585
await nuxtSetup ( {
586
586
laravel : {
587
- outputPath : 'storage/spa.html'
588
- }
587
+ outputPath : 'storage/spa.html' ,
588
+ } ,
589
589
} )
590
590
591
591
expect ( infoSpy ) . toHaveBeenNthCalledWith (
0 commit comments