From 086fb0ee0a1ff7e65c9ded318dced54137d73a7c Mon Sep 17 00:00:00 2001 From: Bill Ticehurst Date: Mon, 29 Feb 2016 22:37:42 -0800 Subject: [PATCH] Fix failing JSDocParser tests (cherry picked from commit ae27b8984730879de63749023cc68d0e777f0fe6) --- tests/cases/unittests/jsDocParsing.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/cases/unittests/jsDocParsing.ts b/tests/cases/unittests/jsDocParsing.ts index 9988383b467..e2941f7fc19 100644 --- a/tests/cases/unittests/jsDocParsing.ts +++ b/tests/cases/unittests/jsDocParsing.ts @@ -11,6 +11,9 @@ module ts { assert.isTrue(typeAndDiagnostics && typeAndDiagnostics.diagnostics.length === 0); let result = Utils.sourceFileToJSON(typeAndDiagnostics.jsDocTypeExpression.type); + + // Remove the parserContextFlags from the comparison + result = result.replace(/\,\n\s+\"parserContextFlags\": \"JavaScriptFile\"/g, ""); assert.equal(result, expected); } @@ -998,7 +1001,10 @@ module ts { ? JSON.parse(Utils.sourceFileToJSON(v)) : v; }, 4); - + + // Remove the parserContextFlags from the comparison + result = result.replace(/\,\n\s+\"parserContextFlags\": \"JavaScriptFile\"/g, ""); + if (result !== expected) { // Turn on a human-readable diff if (typeof require !== 'undefined') {