Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 7 additions & 6 deletions internal/testrunner/compiler_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ func (r *CompilerBaselineRunner) runSingleConfigTest(t *testing.T, testName stri
payload := makeUnitsFromTest(test.content, test.filename)
compilerTest := newCompilerTest(t, testName, test.filename, &payload, config)

switch compilerTest.options.GetEmitModuleKind() {
case core.ModuleKindAMD, core.ModuleKindUMD, core.ModuleKindSystem:
t.Skipf("Skipping test %s with unsupported module kind %s", testName, compilerTest.options.GetEmitModuleKind())
}

compilerTest.verifyDiagnostics(t, r.testSuitName, r.isSubmodule)
compilerTest.verifyJavaScriptOutput(t, r.testSuitName, r.isSubmodule)
compilerTest.verifySourceMapOutput(t, r.testSuitName, r.isSubmodule)
Expand Down Expand Up @@ -336,7 +341,7 @@ func (c *compilerTest) verifyDiagnostics(t *testing.T, suiteName string, isSubmo
tsbaseline.DoErrorBaseline(t, c.configuredName, files, c.result.Diagnostics, c.result.Options.Pretty.IsTrue(), baseline.Options{
Subfolder: suiteName,
IsSubmodule: isSubmodule,
IsSubmoduleAccepted: c.containsUnsupportedOptions(),
IsSubmoduleAccepted: c.containsUnsupportedOptionsForDiagnostics(),
DiffFixupOld: func(old string) string {
var sb strings.Builder
sb.Grow(len(old))
Expand Down Expand Up @@ -506,14 +511,10 @@ func (c *compilerTest) verifyUnionOrdering(t *testing.T) {
})
}

func (c *compilerTest) containsUnsupportedOptions() bool {
func (c *compilerTest) containsUnsupportedOptionsForDiagnostics() bool {
if len(c.result.Program.UnsupportedExtensions()) != 0 {
return true
}
switch c.options.GetEmitModuleKind() {
case core.ModuleKindAMD, core.ModuleKindUMD, core.ModuleKindSystem:
return true
}
if c.options.BaseUrl != "" {
return true
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading