@@ -88,8 +88,13 @@ func (r *CompilerBaselineRunner) EnumerateTestFiles() []string {
88
88
func (r * CompilerBaselineRunner ) RunTests (t * testing.T ) {
89
89
r .cleanUpLocal (t )
90
90
files := r .EnumerateTestFiles ()
91
- skippedTests := []string {
92
- "mappedTypeRecursiveInference.ts" , // Needed until we have type printer with truncation limit.
91
+ skippedTests := map [string ]string {
92
+ "mappedTypeRecursiveInference.ts" : "Skipped until we have type printer with truncation limit." ,
93
+ "jsFileCompilationWithoutJsExtensions.ts" : "Skipped until we have proper allowJS support (and errors when not enabled.)" ,
94
+ "fileReferencesWithNoExtensions.ts" : "Skipped until we support adding missing extensions in subtasks in fileloader.go" ,
95
+ "typeOnlyMerge2.ts" : "Needs investigation" ,
96
+ "typeOnlyMerge3.ts" : "Needs investigation" ,
97
+ "filesEmittingIntoSameOutput.ts" : "Output order nondeterministic due to collision on filename during parallel emit." ,
93
98
}
94
99
deprecatedTests := []string {
95
100
// Test deprecated `importsNotUsedAsValue`
@@ -100,7 +105,8 @@ func (r *CompilerBaselineRunner) RunTests(t *testing.T) {
100
105
"importsNotUsedAsValues_error.ts" ,
101
106
}
102
107
for _ , filename := range files {
103
- if slices .Contains (skippedTests , tspath .GetBaseFileName (filename )) {
108
+ if msg , ok := skippedTests [tspath .GetBaseFileName (filename )]; ok {
109
+ t .Run (tspath .GetBaseFileName (filename ), func (t * testing.T ) { t .Skip (msg ) })
104
110
continue
105
111
}
106
112
if slices .Contains (deprecatedTests , tspath .GetBaseFileName (filename )) {
@@ -174,6 +180,7 @@ func (r *CompilerBaselineRunner) runSingleConfigTest(t *testing.T, testName stri
174
180
compilerTest := newCompilerTest (t , testName , test .filename , & payload , config )
175
181
176
182
compilerTest .verifyDiagnostics (t , r .testSuitName , r .isSubmodule )
183
+ compilerTest .verifyJavaScriptOutput (t , r .testSuitName , r .isSubmodule )
177
184
compilerTest .verifyTypesAndSymbols (t , r .testSuitName , r .isSubmodule )
178
185
// !!! Verify all baselines
179
186
}
@@ -325,8 +332,6 @@ var concurrentSkippedErrorBaselines = core.NewSetFromItems(
325
332
"recursiveExportAssignmentAndFindAliasedType2.ts" ,
326
333
"recursiveExportAssignmentAndFindAliasedType3.ts" ,
327
334
"superInStaticMembers1.ts target=es2015" ,
328
- "typeOnlyMerge2.ts" ,
329
- "typeOnlyMerge3.ts" ,
330
335
)
331
336
332
337
func (c * compilerTest ) verifyDiagnostics (t * testing.T , suiteName string , isSubmodule bool ) {
@@ -345,6 +350,33 @@ func (c *compilerTest) verifyDiagnostics(t *testing.T, suiteName string, isSubmo
345
350
})
346
351
}
347
352
353
+ func (c * compilerTest ) verifyJavaScriptOutput (t * testing.T , suiteName string , isSubmodule bool ) {
354
+ if ! c .hasNonDtsFiles {
355
+ return
356
+ }
357
+
358
+ t .Run ("output" , func (t * testing.T ) {
359
+ defer testutil .RecoverAndFail (t , "Panic on creating js output for test " + c .filename )
360
+ headerComponents := tspath .GetPathComponentsRelativeTo (repo .TestDataPath , c .filename , tspath.ComparePathsOptions {})
361
+ if isSubmodule {
362
+ headerComponents = headerComponents [4 :] // Strip "./../_submodules/TypeScript" prefix
363
+ }
364
+ header := tspath .GetPathFromPathComponents (headerComponents )
365
+ tsbaseline .DoJsEmitBaseline (
366
+ t ,
367
+ c .configuredName ,
368
+ header ,
369
+ c .options ,
370
+ c .result ,
371
+ c .tsConfigFiles ,
372
+ c .toBeCompiled ,
373
+ c .otherFiles ,
374
+ c .harnessOptions ,
375
+ baseline.Options {Subfolder : suiteName , IsSubmodule : isSubmodule },
376
+ )
377
+ })
378
+ }
379
+
348
380
func (c * compilerTest ) verifyTypesAndSymbols (t * testing.T , suiteName string , isSubmodule bool ) {
349
381
noTypesAndSymbols := c .harnessOptions .NoTypesAndSymbols
350
382
if noTypesAndSymbols {
0 commit comments