@@ -52,10 +52,8 @@ if (fs.statSync(testPath).isDirectory() &&
52
52
53
53
// @ts -ignore
54
54
describe ( `${ testToRun } ${ extraOption ? ` - ${ extraOption } : true` : '' } ` , function ( ) {
55
- if ( testToRun !== 'projectReferencesOutDir' || require ( 'os' ) . platform ( ) !== 'win32' ) {
56
- // @ts -ignore
57
- it ( 'should have the correct output' , createTest ( testToRun , testPath , { } ) ) ;
58
- }
55
+ // @ts -ignore
56
+ it ( 'should have the correct output' , createTest ( testToRun , testPath , { } ) ) ;
59
57
60
58
if ( testToRun === 'declarationOutput' ||
61
59
testToRun === 'declarationOutputWithMaps' ||
@@ -390,7 +388,6 @@ function getNormalisedFileContent(file, location) {
390
388
/** @type {string } */
391
389
let fileContent ;
392
390
const filePath = path . join ( location , file ) ;
393
-
394
391
try {
395
392
const originalContent = fs . readFileSync ( filePath ) . toString ( ) ;
396
393
fileContent = ( file . indexOf ( 'output.' ) === 0
@@ -402,9 +399,9 @@ function getNormalisedFileContent(file, location) {
402
399
. replace ( / M o d u l e b u i l d f a i l e d \( f r o m \/ / gm, 'Module build failed (from ' )
403
400
. replace ( / M o d u l e W a r n i n g \( f r o m \/ / gm, 'Module Warning (from ' )
404
401
// We don't want a difference in the number of kilobytes to fail the build
405
- . replace ( / [ \d ] + ( [ . ] [ \d ] * ) ? K i B / g, 'A-NUMBER-OF KiB' )
402
+ . replace ( / \s + [ \d ] + ( [ . ] [ \d ] * ) ? K i B \s + / g, ' A-NUMBER-OF KiB ' )
406
403
// We also don't want a difference in the number of bytes to fail the build
407
- . replace ( / \ d+ b y t e s / g, ' A-NUMBER-OF bytes ' )
404
+ . replace ( / \s + \ d+ b y t e s \s + / g, ' A-NUMBER-OF bytes ' )
408
405
// Ignore whitespace between: Asset Size Chunks Chunk Names
409
406
. replace ( / \s + A s s e t \s + S i z e \s + C h u n k s \s + C h u n k N a m e s / , ' Asset Size Chunks Chunk Names' )
410
407
. replace ( / t e s t \/ c o m p a r i s o n - t e s t s \/ / , ' /test/comparison-tests/' )
@@ -422,11 +419,11 @@ function getNormalisedFileContent(file, location) {
422
419
return 'at ' + remainingPathAndColon + 'irrelevant-line-number' + colon + 'irrelevant-column-number' ;
423
420
} )
424
421
// strip C:/projects/ts-loader/.test/
425
- . replace ( / ( C \: \/ ) ? [ \w | \/ ] * \/ ( t s - l o a d e r | w o r k s p a c e ) \/ \. t e s t / g , '' )
426
- . replace ( / w e b p a c k : \/ \/ ( C : \/ ) ? [ \w | \/ | - ] * \/ c o m p a r i s o n - t e s t s \/ / g , 'webpack://comparison-tests/' )
427
- . replace ( / W E B P A C K F O O T E R \/ n \/ ( C : \/ ) ? [ \w | \/ | - ] * \/ c o m p a r i s o n - t e s t s \/ / g , 'WEBPACK FOOTER/n/ /ts-loader/test/comparison-tests/' )
428
- . replace ( / ! \* * ( C \: \/ ) ? [ \w | \/ | - ] * \/ c o m p a r i s o n - t e s t s \/ / g , '!*** /ts-loader/test/comparison-tests/' )
429
- . replace ( / \/ ( C \: \/ ) ? [ \w | \/ | - ] * \/ c o m p a r i s o n - t e s t s \/ / g , '/ /ts-loader/test/comparison-tests/' )
422
+ . replace ( / ( C \: \/ ) ? [ \w | \/ ] * \/ ( t s - l o a d e r | w o r k s p a c e ) \/ \. t e s t / ig , '' )
423
+ . replace ( / w e b p a c k : \/ \/ ( C : \/ ) ? [ \w | \/ | - ] * \/ c o m p a r i s o n - t e s t s \/ / ig , 'webpack://comparison-tests/' )
424
+ . replace ( / W E B P A C K F O O T E R \/ n \/ ( C : \/ ) ? [ \w | \/ | - ] * \/ c o m p a r i s o n - t e s t s \/ / ig , 'WEBPACK FOOTER/n/ /ts-loader/test/comparison-tests/' )
425
+ . replace ( / ! \* * ( C \: \/ ) ? [ \w | \/ | - ] * \/ c o m p a r i s o n - t e s t s \/ / ig , '!*** /ts-loader/test/comparison-tests/' )
426
+ . replace ( / \/ ( C \: \/ ) ? [ \w | \/ | - ] * \/ c o m p a r i s o n - t e s t s \/ / ig , '/ /ts-loader/test/comparison-tests/' )
430
427
// with webpack 4 there are different numbers of *s on Windows and on Linux
431
428
. replace ( / \* { 10 } \* * / g, '**********' ) ;
432
429
} catch ( e ) {
0 commit comments