From 25c3b99f29e28142f08aa6b987af1866f139593d Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 4 Oct 2017 13:14:05 -0700 Subject: [PATCH] Add skip lib check to many tests (#18935) * Add skip lib check to many tests, do not include unit test duration in profiler duration * Add a few more skipLibCheck flags * A few more * Add more skip lib check flags --- src/harness/parallel/worker.ts | 5 +++++ tests/cases/compiler/APISample_compile.ts | 1 + tests/cases/compiler/APISample_jsdoc.ts | 1 + tests/cases/compiler/APISample_linter.ts | 1 + tests/cases/compiler/APISample_parseConfig.ts | 1 + tests/cases/compiler/APISample_transform.ts | 1 + tests/cases/compiler/APISample_watcher.ts | 1 + tests/cases/compiler/contextuallyTypeArgumentsKeyword.ts | 1 + tests/cases/compiler/correctOrderOfPromiseMethod.ts | 1 + tests/cases/compiler/metadataOfEventAlias.ts | 1 + tests/cases/compiler/modularizeLibrary_Dom.iterable.ts | 3 ++- tests/cases/compiler/symbolMergeValueAndImportedType.ts | 1 + tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx | 1 + tests/cases/conformance/jsx/checkJsxChildrenProperty3.tsx | 1 + tests/cases/conformance/jsx/checkJsxChildrenProperty5.tsx | 1 + .../conformance/jsx/correctlyMarkAliasAsReferences1.tsx | 1 + .../conformance/jsx/correctlyMarkAliasAsReferences2.tsx | 1 + .../conformance/jsx/correctlyMarkAliasAsReferences3.tsx | 1 + .../conformance/jsx/correctlyMarkAliasAsReferences4.tsx | 1 + tests/cases/conformance/jsx/tsxGenericAttributesType4.tsx | 1 + tests/cases/conformance/jsx/tsxSfcReturnNull.tsx | 1 + .../cases/conformance/jsx/tsxSpreadAttributesResolution3.tsx | 1 + .../jsx/tsxStatelessFunctionComponentOverload1.tsx | 1 + .../jsx/tsxStatelessFunctionComponentOverload2.tsx | 1 + .../jsx/tsxStatelessFunctionComponentOverload6.tsx | 1 + .../conformance/jsx/tsxStatelessFunctionComponents1.tsx | 1 + .../jsx/tsxStatelessFunctionComponentsWithTypeArguments2.tsx | 1 + .../jsx/tsxStatelessFunctionComponentsWithTypeArguments3.tsx | 1 + tests/cases/conformance/jsx/tsxUnionTypeComponent1.tsx | 1 + .../parser.asyncGenerators.objectLiteralMethods.esnext.ts | 1 + 30 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/harness/parallel/worker.ts b/src/harness/parallel/worker.ts index 11d8bf649bc..7e95831535a 100644 --- a/src/harness/parallel/worker.ts +++ b/src/harness/parallel/worker.ts @@ -12,6 +12,11 @@ namespace Harness.Parallel.Worker { testList.length = 0; } reportedUnitTests = true; + if (testList.length) { + // Execute unit tests + testList.forEach(({ name, callback, kind }) => executeCallback(name, callback, kind)); + testList.length = 0; + } const start = +(new Date()); runner.initializeTests(); testList.forEach(({ name, callback, kind }) => executeCallback(name, callback, kind)); diff --git a/tests/cases/compiler/APISample_compile.ts b/tests/cases/compiler/APISample_compile.ts index c49d2a7b122..35fe8192e78 100644 --- a/tests/cases/compiler/APISample_compile.ts +++ b/tests/cases/compiler/APISample_compile.ts @@ -1,4 +1,5 @@ // @module: commonjs +// @skipLibCheck: true // @includebuiltfile: typescript_standalone.d.ts // @noImplicitAny:true // @strictNullChecks:true diff --git a/tests/cases/compiler/APISample_jsdoc.ts b/tests/cases/compiler/APISample_jsdoc.ts index 70b814ffff4..2f4e08931d6 100644 --- a/tests/cases/compiler/APISample_jsdoc.ts +++ b/tests/cases/compiler/APISample_jsdoc.ts @@ -1,4 +1,5 @@ // @module: commonjs +// @skipLibCheck: true // @includebuiltfile: typescript_standalone.d.ts // @strict:true diff --git a/tests/cases/compiler/APISample_linter.ts b/tests/cases/compiler/APISample_linter.ts index dc5e2644b4f..0d8dc0190fe 100644 --- a/tests/cases/compiler/APISample_linter.ts +++ b/tests/cases/compiler/APISample_linter.ts @@ -1,4 +1,5 @@ // @module: commonjs +// @skipLibCheck: true // @includebuiltfile: typescript_standalone.d.ts // @noImplicitAny:true // @strictNullChecks:true diff --git a/tests/cases/compiler/APISample_parseConfig.ts b/tests/cases/compiler/APISample_parseConfig.ts index f59f64dc4ad..c3094a93988 100644 --- a/tests/cases/compiler/APISample_parseConfig.ts +++ b/tests/cases/compiler/APISample_parseConfig.ts @@ -1,4 +1,5 @@ // @module: commonjs +// @skipLibCheck: true // @includebuiltfile: typescript_standalone.d.ts // @noImplicitAny:true // @strictNullChecks:true diff --git a/tests/cases/compiler/APISample_transform.ts b/tests/cases/compiler/APISample_transform.ts index a76d6b15463..c7b0fad8e75 100644 --- a/tests/cases/compiler/APISample_transform.ts +++ b/tests/cases/compiler/APISample_transform.ts @@ -1,4 +1,5 @@ // @module: commonjs +// @skipLibCheck: true // @includebuiltfile: typescript_standalone.d.ts // @noImplicitAny:true // @strictNullChecks:true diff --git a/tests/cases/compiler/APISample_watcher.ts b/tests/cases/compiler/APISample_watcher.ts index 436a1401d57..5be0e9e38ad 100644 --- a/tests/cases/compiler/APISample_watcher.ts +++ b/tests/cases/compiler/APISample_watcher.ts @@ -1,4 +1,5 @@ // @module: commonjs +// @skipLibCheck: true // @includebuiltfile: typescript_standalone.d.ts // @noImplicitAny:true // @strictNullChecks:true diff --git a/tests/cases/compiler/contextuallyTypeArgumentsKeyword.ts b/tests/cases/compiler/contextuallyTypeArgumentsKeyword.ts index 9421e70c4e8..f7d55974bf9 100644 --- a/tests/cases/compiler/contextuallyTypeArgumentsKeyword.ts +++ b/tests/cases/compiler/contextuallyTypeArgumentsKeyword.ts @@ -1,6 +1,7 @@ // @noEmit: true // @allowJs: true // @checkJs: true +// @skipLibCheck: true // @lib: es2017, dom // @Filename: foo.js // Repro for #16585 diff --git a/tests/cases/compiler/correctOrderOfPromiseMethod.ts b/tests/cases/compiler/correctOrderOfPromiseMethod.ts index 069c900a4aa..85f4be9843c 100644 --- a/tests/cases/compiler/correctOrderOfPromiseMethod.ts +++ b/tests/cases/compiler/correctOrderOfPromiseMethod.ts @@ -1,3 +1,4 @@ +// @skipLibCheck: true // @lib: dom, es7 interface A { diff --git a/tests/cases/compiler/metadataOfEventAlias.ts b/tests/cases/compiler/metadataOfEventAlias.ts index c62e1480c89..a5b8ffea850 100644 --- a/tests/cases/compiler/metadataOfEventAlias.ts +++ b/tests/cases/compiler/metadataOfEventAlias.ts @@ -1,6 +1,7 @@ // @experimentalDecorators: true // @emitDecoratorMetadata: true // @target: es5 +// @skipLibCheck: true // @includeBuiltFile: lib.d.ts // @filename: event.ts diff --git a/tests/cases/compiler/modularizeLibrary_Dom.iterable.ts b/tests/cases/compiler/modularizeLibrary_Dom.iterable.ts index 3488d255eaa..dbbeea15da6 100644 --- a/tests/cases/compiler/modularizeLibrary_Dom.iterable.ts +++ b/tests/cases/compiler/modularizeLibrary_Dom.iterable.ts @@ -1,4 +1,5 @@ -// @lib: es6,dom,dom.iterable +// @skipLibCheck: true +// @lib: es6,dom,dom.iterable // @target: es6 for (const element of document.getElementsByTagName("a")) { diff --git a/tests/cases/compiler/symbolMergeValueAndImportedType.ts b/tests/cases/compiler/symbolMergeValueAndImportedType.ts index 4779ff22e9d..4865700c519 100644 --- a/tests/cases/compiler/symbolMergeValueAndImportedType.ts +++ b/tests/cases/compiler/symbolMergeValueAndImportedType.ts @@ -1,5 +1,6 @@ // @target: es2015 // @module: commonjs +// @skipLibCheck: true // @lib: es2015,dom // @filename: main.ts import { X } from "./other"; diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx index e49b196b8f8..679ec057999 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty3.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty3.tsx index c67c6d5440d..c70a2292fa2 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty3.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty3.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/checkJsxChildrenProperty5.tsx b/tests/cases/conformance/jsx/checkJsxChildrenProperty5.tsx index 6143e4b0faf..9b9dfac02b2 100644 --- a/tests/cases/conformance/jsx/checkJsxChildrenProperty5.tsx +++ b/tests/cases/conformance/jsx/checkJsxChildrenProperty5.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences1.tsx b/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences1.tsx index a074b3b8086..a27c3114532 100644 --- a/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences1.tsx +++ b/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences1.tsx @@ -1,6 +1,7 @@ // @target: es2017 // @jsx: react // @moduleResolution: node +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts // @filename: declaration.d.ts diff --git a/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences2.tsx b/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences2.tsx index 9755c624fc5..1fff751b61c 100644 --- a/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences2.tsx +++ b/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences2.tsx @@ -1,6 +1,7 @@ // @target: es2017 // @jsx: react // @moduleResolution: node +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts // @filename: declaration.d.ts diff --git a/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences3.tsx b/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences3.tsx index c3bfb0c8a47..2144478d2d6 100644 --- a/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences3.tsx +++ b/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences3.tsx @@ -2,6 +2,7 @@ // @jsx: react // @moduleResolution: node // @noImplicitAny: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts // @filename: declaration.d.ts diff --git a/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences4.tsx b/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences4.tsx index edb9f75f87b..165c91cc39e 100644 --- a/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences4.tsx +++ b/tests/cases/conformance/jsx/correctlyMarkAliasAsReferences4.tsx @@ -1,6 +1,7 @@ // @target: es2017 // @jsx: react // @moduleResolution: node +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts // @filename: declaration.d.ts diff --git a/tests/cases/conformance/jsx/tsxGenericAttributesType4.tsx b/tests/cases/conformance/jsx/tsxGenericAttributesType4.tsx index b207f2b4398..2c134d4e20e 100644 --- a/tests/cases/conformance/jsx/tsxGenericAttributesType4.tsx +++ b/tests/cases/conformance/jsx/tsxGenericAttributesType4.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSfcReturnNull.tsx b/tests/cases/conformance/jsx/tsxSfcReturnNull.tsx index 436b361eaf8..167fbd25c66 100644 --- a/tests/cases/conformance/jsx/tsxSfcReturnNull.tsx +++ b/tests/cases/conformance/jsx/tsxSfcReturnNull.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution3.tsx b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution3.tsx index 8bff2abbd2c..1ddf7bca081 100644 --- a/tests/cases/conformance/jsx/tsxSpreadAttributesResolution3.tsx +++ b/tests/cases/conformance/jsx/tsxSpreadAttributesResolution3.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload1.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload1.tsx index 525d035cbfe..b0da4223ce3 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload1.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload1.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload2.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload2.tsx index 53f21b8edac..bd86e991a2f 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload2.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload2.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload6.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload6.tsx index f2e799c1c8f..eb8f3f3d128 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload6.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentOverload6.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponents1.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponents1.tsx index b486a72ce15..36a11bcc513 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponents1.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponents1.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: preserve // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts function EmptyPropSFC() { diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments2.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments2.tsx index e2a5f818428..aff36145e15 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments2.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments2.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments3.tsx b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments3.tsx index 68285c450c0..b55f9a72b65 100644 --- a/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments3.tsx +++ b/tests/cases/conformance/jsx/tsxStatelessFunctionComponentsWithTypeArguments3.tsx @@ -2,6 +2,7 @@ // @jsx: preserve // @module: amd // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react') diff --git a/tests/cases/conformance/jsx/tsxUnionTypeComponent1.tsx b/tests/cases/conformance/jsx/tsxUnionTypeComponent1.tsx index b9e50357185..09635bbaa16 100644 --- a/tests/cases/conformance/jsx/tsxUnionTypeComponent1.tsx +++ b/tests/cases/conformance/jsx/tsxUnionTypeComponent1.tsx @@ -1,6 +1,7 @@ // @filename: file.tsx // @jsx: react // @noLib: true +// @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); diff --git a/tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.esnext.ts b/tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.esnext.ts index 5da3805d01a..433c24ad2fa 100644 --- a/tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.esnext.ts +++ b/tests/cases/conformance/parser/ecmascriptnext/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.esnext.ts @@ -1,4 +1,5 @@ // @target: esnext +// @skipLibCheck: true // @lib: esnext // @noEmit: true // @filename: methodIsOk.ts