Skip to content

Commit 2818b2b

Browse files
committed
Minor fixes
1 parent f33a2b0 commit 2818b2b

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/harness/harness.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ module Utils {
9696
path = "tests/" + path;
9797
}
9898

99-
let content = '';
99+
let content: string = undefined;
100100
try {
101101
content = ts.sys.readFile(Harness.userSpecifiedRoot + path);
102102
}
@@ -812,12 +812,12 @@ module Harness {
812812
sourceText: string,
813813
languageVersion: ts.ScriptTarget) {
814814
// We'll only assert inletiants outside of light mode.
815-
const shouldassertInvariants = !Harness.lightMode;
815+
const shouldAssertInvariants = !Harness.lightMode;
816816

817817
// Only set the parent nodes if we're asserting inletiants. We don't need them otherwise.
818-
let result = ts.createSourceFile(fileName, sourceText, languageVersion, /*setParentNodes:*/ shouldassertInvariants);
818+
let result = ts.createSourceFile(fileName, sourceText, languageVersion, /*setParentNodes:*/ shouldAssertInvariants);
819819

820-
if (shouldassertInvariants) {
820+
if (shouldAssertInvariants) {
821821
Utils.assertInvariants(result, /*parent:*/ undefined);
822822
}
823823

src/harness/sourceMapRecorder.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,6 @@ module Harness.SourceMapRecoder {
329329
}
330330

331331
function writeRecordedSpans() {
332-
let markerIds: string[] = [];
333-
334332
function getMarkerId(markerIndex: number) {
335333
let markerId = "";
336334
if (spanMarkerContinues) {
@@ -418,6 +416,7 @@ module Harness.SourceMapRecoder {
418416
writeJsFileLines(currentJsLine);
419417

420418
// Emit markers
419+
var markerIds: string[] = [];
421420
iterateSpans(writeSourceMapMarker);
422421

423422
let jsFileText = getTextOfLine(currentJsLine, jsLineMap, jsFile.code);

0 commit comments

Comments
 (0)