Skip to content

Commit 5701729

Browse files
authored
Stop collecting type baselines for RWC tests (microsoft#19482)
1 parent b0a3f9d commit 5701729

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/harness/rwcRunner.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ namespace RWC {
3939
const baseName = ts.getBaseFileName(jsonPath);
4040
let currentDirectory: string;
4141
let useCustomLibraryFile: boolean;
42-
let skipTypeBaselines = false;
43-
const typeSizeLimit = 10000000;
4442
after(() => {
4543
// Mocha holds onto the closure environment of the describe callback even after the test is done.
4644
// Therefore we have to clean out large objects after the test is done.
@@ -54,7 +52,6 @@ namespace RWC {
5452
// or to use lib.d.ts inside the json object. If the flag is true, use the lib.d.ts inside json file
5553
// otherwise use the lib.d.ts from built/local
5654
useCustomLibraryFile = undefined;
57-
skipTypeBaselines = false;
5855
});
5956

6057
it("can compile", function(this: Mocha.ITestCallbackContext) {
@@ -64,7 +61,6 @@ namespace RWC {
6461
const ioLog: IOLog = Playback.newStyleLogIntoOldStyleLog(JSON.parse(Harness.IO.readFile(`internal/cases/rwc/${jsonPath}/test.json`)), Harness.IO, `internal/cases/rwc/${baseName}`);
6562
currentDirectory = ioLog.currentDirectory;
6663
useCustomLibraryFile = ioLog.useCustomLibraryFile;
67-
skipTypeBaselines = ioLog.filesRead.reduce((acc, elem) => (elem && elem.result && elem.result.contents) ? acc + elem.result.contents.length : acc, 0) > typeSizeLimit;
6864
runWithIOLog(ioLog, () => {
6965
opts = ts.parseCommandLine(ioLog.arguments, fileName => Harness.IO.readFile(fileName));
7066
assert.equal(opts.errors.length, 0);
@@ -199,14 +195,6 @@ namespace RWC {
199195
}, baselineOpts, [".map"]);
200196
});
201197

202-
/*it("has correct source map record", () => {
203-
if (compilerOptions.sourceMap) {
204-
Harness.Baseline.runBaseline(baseName + ".sourcemap.txt", () => {
205-
return compilerResult.getSourceMapRecord();
206-
}, baselineOpts);
207-
}
208-
});*/
209-
210198
it("has the expected errors", () => {
211199
Harness.Baseline.runMultifileBaseline(baseName, ".errors.txt", () => {
212200
if (compilerResult.errors.length === 0) {
@@ -219,14 +207,6 @@ namespace RWC {
219207
}, baselineOpts);
220208
});
221209

222-
it("has the expected types", () => {
223-
// We don't need to pass the extension here because "doTypeAndSymbolBaseline" will append appropriate extension of ".types" or ".symbols"
224-
Harness.Compiler.doTypeAndSymbolBaseline(baseName, compilerResult.program, inputFiles
225-
.concat(otherFiles)
226-
.filter(file => !!compilerResult.program.getSourceFile(file.unitName))
227-
.filter(e => !Harness.isDefaultLibraryFile(e.unitName)), baselineOpts, /*multifile*/ true, skipTypeBaselines, /*skipSymbolbaselines*/ true);
228-
});
229-
230210
// Ideally, a generated declaration file will have no errors. But we allow generated
231211
// declaration file errors as part of the baseline.
232212
it("has the expected errors in generated declaration files", () => {

0 commit comments

Comments
 (0)