Skip to content

Commit a7fac73

Browse files
authored
Skip all tests using AMD/UMD/SystemJS (microsoft#1292)
1 parent 8370e5f commit a7fac73

File tree

2,956 files changed

+7
-136384
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,956 files changed

+7
-136384
lines changed

internal/testrunner/compiler_runner.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ func (r *CompilerBaselineRunner) runSingleConfigTest(t *testing.T, testName stri
166166
payload := makeUnitsFromTest(test.content, test.filename)
167167
compilerTest := newCompilerTest(t, testName, test.filename, &payload, config)
168168

169+
switch compilerTest.options.GetEmitModuleKind() {
170+
case core.ModuleKindAMD, core.ModuleKindUMD, core.ModuleKindSystem:
171+
t.Skipf("Skipping test %s with unsupported module kind %s", testName, compilerTest.options.GetEmitModuleKind())
172+
}
173+
169174
compilerTest.verifyDiagnostics(t, r.testSuitName, r.isSubmodule)
170175
compilerTest.verifyJavaScriptOutput(t, r.testSuitName, r.isSubmodule)
171176
compilerTest.verifySourceMapOutput(t, r.testSuitName, r.isSubmodule)
@@ -336,7 +341,7 @@ func (c *compilerTest) verifyDiagnostics(t *testing.T, suiteName string, isSubmo
336341
tsbaseline.DoErrorBaseline(t, c.configuredName, files, c.result.Diagnostics, c.result.Options.Pretty.IsTrue(), baseline.Options{
337342
Subfolder: suiteName,
338343
IsSubmodule: isSubmodule,
339-
IsSubmoduleAccepted: c.containsUnsupportedOptions(),
344+
IsSubmoduleAccepted: c.containsUnsupportedOptionsForDiagnostics(),
340345
DiffFixupOld: func(old string) string {
341346
var sb strings.Builder
342347
sb.Grow(len(old))
@@ -506,14 +511,10 @@ func (c *compilerTest) verifyUnionOrdering(t *testing.T) {
506511
})
507512
}
508513

509-
func (c *compilerTest) containsUnsupportedOptions() bool {
514+
func (c *compilerTest) containsUnsupportedOptionsForDiagnostics() bool {
510515
if len(c.result.Program.UnsupportedExtensions()) != 0 {
511516
return true
512517
}
513-
switch c.options.GetEmitModuleKind() {
514-
case core.ModuleKindAMD, core.ModuleKindUMD, core.ModuleKindSystem:
515-
return true
516-
}
517518
if c.options.BaseUrl != "" {
518519
return true
519520
}

testdata/baselines/reference/submodule/compiler/SystemModuleForStatementNoInitializer.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

testdata/baselines/reference/submodule/compiler/SystemModuleForStatementNoInitializer.js.diff

Lines changed: 0 additions & 40 deletions
This file was deleted.

testdata/baselines/reference/submodule/compiler/SystemModuleForStatementNoInitializer.symbols

Lines changed: 0 additions & 29 deletions
This file was deleted.

testdata/baselines/reference/submodule/compiler/SystemModuleForStatementNoInitializer.types

Lines changed: 0 additions & 34 deletions
This file was deleted.

testdata/baselines/reference/submodule/compiler/aliasesInSystemModule1.errors.txt

Lines changed: 0 additions & 21 deletions
This file was deleted.

testdata/baselines/reference/submodule/compiler/aliasesInSystemModule1.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

testdata/baselines/reference/submodule/compiler/aliasesInSystemModule1.js.diff

Lines changed: 0 additions & 44 deletions
This file was deleted.

testdata/baselines/reference/submodule/compiler/aliasesInSystemModule1.symbols

Lines changed: 0 additions & 49 deletions
This file was deleted.

testdata/baselines/reference/submodule/compiler/aliasesInSystemModule1.symbols.diff

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)