diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index fb3bed30c3b..144cc9745d9 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -2241,11 +2241,12 @@ module FourSlash { (fn, contents) => result = contents, ts.ScriptTarget.Latest, sys.useCaseSensitiveFileNames); - var program = ts.createProgram([Harness.Compiler.fourslashFilename, fileName], { out: "fourslashTestOutput.js" }, host); + // TODO (drosen): We need to enforce checking on these tests. + var program = ts.createProgram([Harness.Compiler.fourslashFilename, fileName], { out: "fourslashTestOutput.js", noResolve: true }, host); var checker = ts.createTypeChecker(program, /*fullTypeCheckMode*/ true); checker.checkProgram(); - var errs = checker.getDiagnostics(program.getSourceFile(fileName)); + var errs = program.getDiagnostics().concat(checker.getDiagnostics()); if (errs.length > 0) { throw new Error('Error compiling ' + fileName + ': ' + errs.map(e => e.messageText).join('\r\n')); } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index d5eaa3828a1..aee0ef3c534 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -585,7 +585,7 @@ module Harness { return defaultLibSourceFile; } // Don't throw here -- the compiler might be looking for a test that actually doesn't exist as part of the TC - return null; + return undefined; } }, getDefaultLibFilename: () => defaultLibFileName, diff --git a/tests/cases/fourslash/completionListInTemplateLiteralParts1.ts b/tests/cases/fourslash/completionListInTemplateLiteralParts1.ts index a71584bdbdd..0166546f63e 100644 --- a/tests/cases/fourslash/completionListInTemplateLiteralParts1.ts +++ b/tests/cases/fourslash/completionListInTemplateLiteralParts1.ts @@ -8,4 +8,4 @@ test.markers().forEach(marker => { goTo.position(marker.position); verify.completionListItemsCountIsGreaterThan(0) -}} \ No newline at end of file +}); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListInTemplateLiteralPartsNegatives1.ts b/tests/cases/fourslash/completionListInTemplateLiteralPartsNegatives1.ts index 1624192057b..ac64a41fb56 100644 --- a/tests/cases/fourslash/completionListInTemplateLiteralPartsNegatives1.ts +++ b/tests/cases/fourslash/completionListInTemplateLiteralPartsNegatives1.ts @@ -8,4 +8,4 @@ test.markers().forEach(marker => { goTo.position(marker.position); verify.completionListIsEmpty() -} \ No newline at end of file +}); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsInsideTemplates1.ts b/tests/cases/fourslash/findAllRefsInsideTemplates1.ts index e4501219265..dd4461751de 100644 --- a/tests/cases/fourslash/findAllRefsInsideTemplates1.ts +++ b/tests/cases/fourslash/findAllRefsInsideTemplates1.ts @@ -8,5 +8,5 @@ test.ranges().forEach(targetRange => { test.ranges().forEach(range => { verify.referencesAtPositionContains(range); - } -} \ No newline at end of file + }); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsInsideTemplates2.ts b/tests/cases/fourslash/findAllRefsInsideTemplates2.ts index cafddd4f45b..7f585234082 100644 --- a/tests/cases/fourslash/findAllRefsInsideTemplates2.ts +++ b/tests/cases/fourslash/findAllRefsInsideTemplates2.ts @@ -8,5 +8,5 @@ test.ranges().forEach(targetRange => { test.ranges().forEach(range => { verify.referencesAtPositionContains(range); - } -} \ No newline at end of file + }); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesReturnBroken.ts b/tests/cases/fourslash/getOccurrencesReturnBroken.ts index e740e7f2bb3..08ec794f7e8 100644 --- a/tests/cases/fourslash/getOccurrencesReturnBroken.ts +++ b/tests/cases/fourslash/getOccurrencesReturnBroken.ts @@ -51,4 +51,4 @@ for (var i = 1; i <= test.markers().length; i++) { verify.occurrencesAtPositionCount(1); // 'return' is an instance member break; } -}); \ No newline at end of file +} \ No newline at end of file