@@ -288,13 +288,13 @@ describe('Functional tests using webpack', function() {
288
288
'bg.483832e48e67e6a3b7f0ae064eadca51.css' ,
289
289
'manifest.json'
290
290
]
291
- ) ;
291
+ ) ;
292
292
293
293
expect ( path . join ( config . outputPath , 'images' ) ) . to . be . a . directory ( )
294
294
. with . files ( [
295
295
'symfony_logo.ea1ca6f7.png'
296
296
]
297
- ) ;
297
+ ) ;
298
298
299
299
webpackAssert . assertOutputFileContains (
300
300
'bg.483832e48e67e6a3b7f0ae064eadca51.css' ,
@@ -319,19 +319,19 @@ describe('Functional tests using webpack', function() {
319
319
'font.css' ,
320
320
'manifest.json'
321
321
]
322
- ) ;
322
+ ) ;
323
323
324
324
expect ( path . join ( config . outputPath , 'images' ) ) . to . be . a . directory ( )
325
325
. with . files ( [
326
326
'symfony_logo.ea1ca6f7.png'
327
327
]
328
- ) ;
328
+ ) ;
329
329
330
330
expect ( path . join ( config . outputPath , 'fonts' ) ) . to . be . a . directory ( )
331
331
. with . files ( [
332
332
'Roboto.9896f773.woff2'
333
333
]
334
- ) ;
334
+ ) ;
335
335
336
336
webpackAssert . assertOutputFileContains (
337
337
'bg.css' ,
@@ -359,21 +359,21 @@ describe('Functional tests using webpack', function() {
359
359
'styles.css' ,
360
360
'manifest.json'
361
361
]
362
- ) ;
362
+ ) ;
363
363
364
364
expect ( path . join ( config . outputPath , 'images' ) ) . to . be . a . directory ( )
365
365
. with . files ( [
366
366
'symfony_logo.ea1ca6f7.png' ,
367
367
'symfony_logo.f27119c2.png'
368
368
]
369
- ) ;
369
+ ) ;
370
370
371
371
expect ( path . join ( config . outputPath , 'fonts' ) ) . to . be . a . directory ( )
372
372
. with . files ( [
373
373
'Roboto.9896f773.woff2' ,
374
374
'Roboto.3c37aa69.woff2'
375
375
]
376
- ) ;
376
+ ) ;
377
377
378
378
webpackAssert . assertOutputFileContains (
379
379
'styles.css' ,
@@ -587,7 +587,7 @@ module.exports = {
587
587
588
588
fs . writeFileSync (
589
589
path . join ( appDir , '.babelrc' ) ,
590
- `
590
+ `
591
591
{
592
592
"presets": [
593
593
["env", {
@@ -667,6 +667,26 @@ module.exports = {
667
667
} ) ;
668
668
} ) ;
669
669
670
+ it ( 'TypeScript is compiled and type checking is done in a separate process!' , ( done ) => {
671
+ this . timeout ( 8000 ) ;
672
+ setTimeout ( done , 7000 ) ;
673
+
674
+ const config = createWebpackConfig ( 'www/build' , 'dev' ) ;
675
+ config . setPublicPath ( '/build' ) ;
676
+ config . addEntry ( 'main' , [ './js/render.ts' , './js/index.ts' ] ) ;
677
+ config . enableTypeScriptLoader ( ) ;
678
+ // test should fail if `config.tsconfig` is not set up properly
679
+ config . enableForkedTypeScriptTypesChecking ( ( config ) => {
680
+ config . silent = true ; // remove to get output on terminal
681
+ } ) ;
682
+
683
+ expect ( function ( ) {
684
+ testSetup . runWebpack ( config , ( webpackAssert ) => {
685
+ done ( ) ;
686
+ } ) ;
687
+ } ) . to . throw ( 'wrong `tsconfig` path in fork plugin configuration (should be a relative or absolute path)' ) ;
688
+ } ) ;
689
+
670
690
it ( 'The output directory is cleaned between builds' , ( done ) => {
671
691
const config = createWebpackConfig ( 'www/build' , 'dev' ) ;
672
692
config . setPublicPath ( '/build' ) ;
0 commit comments