mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Use explicit extensions for imports within src (#58421)
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
/* Generated file to emulate the FourSlash namespace. */
|
||||
|
||||
export * from "../../harness/_namespaces/FourSlash";
|
||||
export * from "../../harness/_namespaces/FourSlash.js";
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* Generated file to emulate the Harness.Parallel.Host namespace. */
|
||||
|
||||
export * from "../parallel/host";
|
||||
export * from "../parallel/host.js";
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* Generated file to emulate the Harness.Parallel.Worker namespace. */
|
||||
|
||||
export * from "../parallel/worker";
|
||||
export * from "../parallel/worker.js";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Generated file to emulate the Harness.Parallel namespace. */
|
||||
|
||||
export * from "../parallel/shared";
|
||||
import * as Host from "./Harness.Parallel.Host";
|
||||
export * from "../parallel/shared.js";
|
||||
import * as Host from "./Harness.Parallel.Host.js";
|
||||
export { Host };
|
||||
import * as Worker from "./Harness.Parallel.Worker";
|
||||
import * as Worker from "./Harness.Parallel.Worker.js";
|
||||
export { Worker };
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
/* Generated file to emulate the Harness namespace. */
|
||||
|
||||
export * from "../../harness/_namespaces/Harness";
|
||||
export * from "../../harness/_namespaces/Harness.js";
|
||||
|
||||
import * as Parallel from "./Harness.Parallel";
|
||||
import * as Parallel from "./Harness.Parallel.js";
|
||||
export { Parallel };
|
||||
|
||||
export * from "../fourslashRunner";
|
||||
export * from "../compilerRunner";
|
||||
export * from "../transpileRunner";
|
||||
export * from "../runner";
|
||||
export * from "../fourslashRunner.js";
|
||||
export * from "../compilerRunner.js";
|
||||
export * from "../transpileRunner.js";
|
||||
export * from "../runner.js";
|
||||
|
||||
// If running as emitted CJS, don't start executing the tests here; instead start in runner.ts.
|
||||
// If running bundled, we want this to be here so that esbuild places the tests after runner.ts.
|
||||
if (!__filename.endsWith("Harness.js")) {
|
||||
require("../tests");
|
||||
require("../tests.js");
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* Generated file to emulate the Utils namespace. */
|
||||
|
||||
export * from "../../harness/_namespaces/Utils";
|
||||
export * from "../../harness/_namespaces/Utils.js";
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* Generated file to emulate the compiler namespace. */
|
||||
|
||||
export * from "../../harness/_namespaces/compiler";
|
||||
export * from "../../harness/_namespaces/compiler.js";
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* Generated file to emulate the documents namespace. */
|
||||
|
||||
export * from "../../harness/_namespaces/documents";
|
||||
export * from "../../harness/_namespaces/documents.js";
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* Generated file to emulate the evaluator namespace. */
|
||||
|
||||
export * from "../../harness/_namespaces/evaluator";
|
||||
export * from "../../harness/_namespaces/evaluator.js";
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* Generated file to emulate the fakes namespace. */
|
||||
|
||||
export * from "../../harness/_namespaces/fakes";
|
||||
export * from "../../harness/_namespaces/fakes.js";
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* Generated file to emulate the project namespace. */
|
||||
|
||||
export * from "../projectsRunner";
|
||||
export * from "../projectsRunner.js";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Generated file to emulate the ts.server namespace. */
|
||||
|
||||
export * from "../../jsTyping/_namespaces/ts.server";
|
||||
export * from "../../server/_namespaces/ts.server";
|
||||
export * from "../../typingsInstallerCore/_namespaces/ts.server";
|
||||
export * from "../../harness/_namespaces/ts.server";
|
||||
export * from "../../jsTyping/_namespaces/ts.server.js";
|
||||
export * from "../../server/_namespaces/ts.server.js";
|
||||
export * from "../../typingsInstallerCore/_namespaces/ts.server.js";
|
||||
export * from "../../harness/_namespaces/ts.server.js";
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/* Generated file to emulate the ts namespace. */
|
||||
|
||||
export * from "../../compiler/_namespaces/ts";
|
||||
export * from "../../services/_namespaces/ts";
|
||||
export * from "../../jsTyping/_namespaces/ts";
|
||||
export * from "../../server/_namespaces/ts";
|
||||
export * from "../../typingsInstallerCore/_namespaces/ts";
|
||||
export * from "../../deprecatedCompat/_namespaces/ts";
|
||||
export * from "../../harness/_namespaces/ts";
|
||||
import * as server from "./ts.server";
|
||||
export * from "../../compiler/_namespaces/ts.js";
|
||||
export * from "../../services/_namespaces/ts.js";
|
||||
export * from "../../jsTyping/_namespaces/ts.js";
|
||||
export * from "../../server/_namespaces/ts.js";
|
||||
export * from "../../typingsInstallerCore/_namespaces/ts.js";
|
||||
export * from "../../deprecatedCompat/_namespaces/ts.js";
|
||||
export * from "../../harness/_namespaces/ts.js";
|
||||
import * as server from "./ts.server.js";
|
||||
export { server };
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* Generated file to emulate the vfs namespace. */
|
||||
|
||||
export * from "../../harness/_namespaces/vfs";
|
||||
export * from "../../harness/_namespaces/vfs.js";
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* Generated file to emulate the vpath namespace. */
|
||||
|
||||
export * from "../../harness/_namespaces/vpath";
|
||||
export * from "../../harness/_namespaces/vpath.js";
|
||||
|
||||
@@ -9,11 +9,11 @@ import {
|
||||
RunnerBase,
|
||||
TestCaseParser,
|
||||
TestRunnerKind,
|
||||
} from "./_namespaces/Harness";
|
||||
import * as ts from "./_namespaces/ts";
|
||||
import * as Utils from "./_namespaces/Utils";
|
||||
import * as vfs from "./_namespaces/vfs";
|
||||
import * as vpath from "./_namespaces/vpath";
|
||||
} from "./_namespaces/Harness.js";
|
||||
import * as ts from "./_namespaces/ts.js";
|
||||
import * as Utils from "./_namespaces/Utils.js";
|
||||
import * as vfs from "./_namespaces/vfs.js";
|
||||
import * as vpath from "./_namespaces/vpath.js";
|
||||
|
||||
export const enum CompilerTestType {
|
||||
Conformance,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import * as FourSlash from "./_namespaces/FourSlash";
|
||||
import * as FourSlash from "./_namespaces/FourSlash.js";
|
||||
import {
|
||||
IO,
|
||||
RunnerBase,
|
||||
TestRunnerKind,
|
||||
} from "./_namespaces/Harness";
|
||||
import * as ts from "./_namespaces/ts";
|
||||
} from "./_namespaces/Harness.js";
|
||||
import * as ts from "./_namespaces/ts.js";
|
||||
|
||||
export class FourSlashRunner extends RunnerBase {
|
||||
protected basePath: string;
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
TestConfig,
|
||||
TestRunnerKind,
|
||||
workerCount,
|
||||
} from "../_namespaces/Harness";
|
||||
} from "../_namespaces/Harness.js";
|
||||
import {
|
||||
ErrorInfo,
|
||||
ParallelClientMessage,
|
||||
@@ -21,9 +21,9 @@ import {
|
||||
Task,
|
||||
TaskTimeout,
|
||||
TestInfo,
|
||||
} from "../_namespaces/Harness.Parallel";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as Utils from "../_namespaces/Utils";
|
||||
} from "../_namespaces/Harness.Parallel.js";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
import * as Utils from "../_namespaces/Utils.js";
|
||||
|
||||
export function start() {
|
||||
const Mocha = require("mocha") as typeof import("mocha");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { TestRunnerKind } from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import { TestRunnerKind } from "../_namespaces/Harness.js";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
export interface RunnerTask {
|
||||
runner: TestRunnerKind;
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
globalTimeout,
|
||||
RunnerBase,
|
||||
runUnitTests,
|
||||
} from "../_namespaces/Harness";
|
||||
} from "../_namespaces/Harness.js";
|
||||
import {
|
||||
ErrorInfo,
|
||||
ParallelClientMessage,
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
TaskResult,
|
||||
TestInfo,
|
||||
UnitTestTask,
|
||||
} from "../_namespaces/Harness.Parallel";
|
||||
} from "../_namespaces/Harness.Parallel.js";
|
||||
|
||||
export function start() {
|
||||
function hookUncaughtExceptions() {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import * as documents from "./_namespaces/documents";
|
||||
import * as fakes from "./_namespaces/fakes";
|
||||
import * as Harness from "./_namespaces/Harness";
|
||||
import * as ts from "./_namespaces/ts";
|
||||
import * as Utils from "./_namespaces/Utils";
|
||||
import * as vfs from "./_namespaces/vfs";
|
||||
import * as vpath from "./_namespaces/vpath";
|
||||
import * as documents from "./_namespaces/documents.js";
|
||||
import * as fakes from "./_namespaces/fakes.js";
|
||||
import * as Harness from "./_namespaces/Harness.js";
|
||||
import * as ts from "./_namespaces/ts.js";
|
||||
import * as Utils from "./_namespaces/Utils.js";
|
||||
import * as vfs from "./_namespaces/vfs.js";
|
||||
import * as vpath from "./_namespaces/vpath.js";
|
||||
|
||||
// Test case is json of below type in tests/cases/project/
|
||||
interface ProjectRunnerTestCase {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as FourSlash from "./_namespaces/FourSlash";
|
||||
import * as FourSlash from "./_namespaces/FourSlash.js";
|
||||
import {
|
||||
CompilerBaselineRunner,
|
||||
CompilerTestType,
|
||||
@@ -12,10 +12,10 @@ import {
|
||||
setShards,
|
||||
TestRunnerKind,
|
||||
TranspileRunner,
|
||||
} from "./_namespaces/Harness";
|
||||
import * as project from "./_namespaces/project";
|
||||
import * as ts from "./_namespaces/ts";
|
||||
import * as vpath from "./_namespaces/vpath";
|
||||
} from "./_namespaces/Harness.js";
|
||||
import * as project from "./_namespaces/project.js";
|
||||
import * as ts from "./_namespaces/ts.js";
|
||||
import * as vpath from "./_namespaces/vpath.js";
|
||||
|
||||
/* eslint-disable prefer-const */
|
||||
export let runners: RunnerBase[] = [];
|
||||
@@ -271,5 +271,5 @@ startTestEnvironment();
|
||||
// If running as emitted CJS, we want to start the tests here after startTestEnvironment.
|
||||
// If running bundled, we will do this in Harness.ts.
|
||||
if (__filename.endsWith("runner.js")) {
|
||||
require("./tests");
|
||||
require("./tests.js");
|
||||
}
|
||||
|
||||
+221
-221
@@ -1,221 +1,221 @@
|
||||
import "./unittests/asserts";
|
||||
import "./unittests/base64";
|
||||
import "./unittests/builder";
|
||||
import "./unittests/canWatch";
|
||||
import "./unittests/comments";
|
||||
import "./unittests/compilerCore";
|
||||
import "./unittests/convertToBase64";
|
||||
import "./unittests/customTransforms";
|
||||
import "./unittests/diagnosticCollection";
|
||||
import "./unittests/factory";
|
||||
import "./unittests/incrementalParser";
|
||||
import "./unittests/jsDocParsing";
|
||||
import "./unittests/jsonParserRecovery";
|
||||
import "./unittests/moduleResolution";
|
||||
import "./unittests/parsePseudoBigInt";
|
||||
import "./unittests/paths";
|
||||
import "./unittests/printer";
|
||||
import "./unittests/programApi";
|
||||
import "./unittests/publicApi";
|
||||
import "./unittests/reuseProgramStructure";
|
||||
import "./unittests/semver";
|
||||
import "./unittests/transform";
|
||||
import "./unittests/typeParameterIsPossiblyReferenced";
|
||||
import "./unittests/config/commandLineParsing";
|
||||
import "./unittests/config/configurationExtension";
|
||||
import "./unittests/config/convertCompilerOptionsFromJson";
|
||||
import "./unittests/config/convertTypeAcquisitionFromJson";
|
||||
import "./unittests/config/initializeTSConfig";
|
||||
import "./unittests/config/matchFiles";
|
||||
import "./unittests/config/showConfig";
|
||||
import "./unittests/config/tsconfigParsing";
|
||||
import "./unittests/config/tsconfigParsingWatchOptions";
|
||||
import "./unittests/evaluation/arraySpread";
|
||||
import "./unittests/evaluation/asyncArrow";
|
||||
import "./unittests/evaluation/asyncGenerator";
|
||||
import "./unittests/evaluation/autoAccessors";
|
||||
import "./unittests/evaluation/awaiter";
|
||||
import "./unittests/evaluation/constEnum";
|
||||
import "./unittests/evaluation/destructuring";
|
||||
import "./unittests/evaluation/externalModules";
|
||||
import "./unittests/evaluation/esDecorators";
|
||||
import "./unittests/evaluation/esDecoratorsMetadata";
|
||||
import "./unittests/evaluation/forAwaitOf";
|
||||
import "./unittests/evaluation/forOf";
|
||||
import "./unittests/evaluation/generator";
|
||||
import "./unittests/evaluation/optionalCall";
|
||||
import "./unittests/evaluation/objectRest";
|
||||
import "./unittests/evaluation/superInStaticInitializer";
|
||||
import "./unittests/evaluation/templateLiteral";
|
||||
import "./unittests/evaluation/updateExpressionInModule";
|
||||
import "./unittests/evaluation/usingDeclarations";
|
||||
import "./unittests/evaluation/awaitUsingDeclarations";
|
||||
import "./unittests/services/cancellableLanguageServiceOperations";
|
||||
import "./unittests/services/colorization";
|
||||
import "./unittests/services/convertToAsyncFunction";
|
||||
import "./unittests/services/documentRegistry";
|
||||
import "./unittests/services/extract/constants";
|
||||
import "./unittests/services/extract/functions";
|
||||
import "./unittests/services/extract/symbolWalker";
|
||||
import "./unittests/services/extract/ranges";
|
||||
import "./unittests/services/hostNewLineSupport";
|
||||
import "./unittests/services/languageService";
|
||||
import "./unittests/services/organizeImports";
|
||||
import "./unittests/services/patternMatcher";
|
||||
import "./unittests/services/preProcessFile";
|
||||
import "./unittests/services/textChanges";
|
||||
import "./unittests/services/transpile";
|
||||
import "./unittests/services/utilities";
|
||||
import "./unittests/sys/symlinkWatching";
|
||||
import "./unittests/tsbuild/amdModulesWithOut";
|
||||
import "./unittests/tsbuild/clean";
|
||||
import "./unittests/tsbuild/commandLine";
|
||||
import "./unittests/tsbuild/configFileErrors";
|
||||
import "./unittests/tsbuild/configFileExtends";
|
||||
import "./unittests/tsbuild/containerOnlyReferenced";
|
||||
import "./unittests/tsbuild/declarationEmit";
|
||||
import "./unittests/tsbuild/demo";
|
||||
import "./unittests/tsbuild/emitDeclarationOnly";
|
||||
import "./unittests/tsbuild/emptyFiles";
|
||||
import "./unittests/tsbuild/exitCodeOnBogusFile";
|
||||
import "./unittests/tsbuild/extends";
|
||||
import "./unittests/tsbuild/fileDelete";
|
||||
import "./unittests/tsbuild/graphOrdering";
|
||||
import "./unittests/tsbuild/inferredTypeFromTransitiveModule";
|
||||
import "./unittests/tsbuild/javascriptProjectEmit";
|
||||
import "./unittests/tsbuild/lateBoundSymbol";
|
||||
import "./unittests/tsbuild/libraryResolution";
|
||||
import "./unittests/tsbuild/moduleResolution";
|
||||
import "./unittests/tsbuild/moduleSpecifiers";
|
||||
import "./unittests/tsbuild/noCheck";
|
||||
import "./unittests/tsbuild/noEmit";
|
||||
import "./unittests/tsbuild/noEmitOnError";
|
||||
import "./unittests/tsbuild/outFile";
|
||||
import "./unittests/tsbuild/outputPaths";
|
||||
import "./unittests/tsbuild/publicApi";
|
||||
import "./unittests/tsbuild/referencesWithRootDirInParent";
|
||||
import "./unittests/tsbuild/resolveJsonModule";
|
||||
import "./unittests/tsbuild/roots";
|
||||
import "./unittests/tsbuild/sample";
|
||||
import "./unittests/tsbuild/transitiveReferences";
|
||||
import "./unittests/tsbuildWatch/configFileErrors";
|
||||
import "./unittests/tsbuildWatch/demo";
|
||||
import "./unittests/tsbuildWatch/extends";
|
||||
import "./unittests/tsbuildWatch/libraryResolution";
|
||||
import "./unittests/tsbuildWatch/moduleResolution";
|
||||
import "./unittests/tsbuildWatch/noEmit";
|
||||
import "./unittests/tsbuildWatch/noEmitOnError";
|
||||
import "./unittests/tsbuildWatch/programUpdates";
|
||||
import "./unittests/tsbuildWatch/projectsBuilding";
|
||||
import "./unittests/tsbuildWatch/publicApi";
|
||||
import "./unittests/tsbuildWatch/reexport";
|
||||
import "./unittests/tsbuildWatch/watchEnvironment";
|
||||
import "./unittests/tsc/cancellationToken";
|
||||
import "./unittests/tsc/composite";
|
||||
import "./unittests/tsc/declarationEmit";
|
||||
import "./unittests/tsc/extends";
|
||||
import "./unittests/tsc/forceConsistentCasingInFileNames";
|
||||
import "./unittests/tsc/incremental";
|
||||
import "./unittests/tsc/libraryResolution";
|
||||
import "./unittests/tsc/listFilesOnly";
|
||||
import "./unittests/tsc/moduleResolution";
|
||||
import "./unittests/tsc/projectReferences";
|
||||
import "./unittests/tsc/projectReferencesConfig";
|
||||
import "./unittests/tsc/redirect";
|
||||
import "./unittests/tsc/runWithoutArgs";
|
||||
import "./unittests/tscWatch/consoleClearing";
|
||||
import "./unittests/tscWatch/emit";
|
||||
import "./unittests/tscWatch/nodeNextWatch";
|
||||
import "./unittests/tscWatch/emitAndErrorUpdates";
|
||||
import "./unittests/tscWatch/extends";
|
||||
import "./unittests/tscWatch/forceConsistentCasingInFileNames";
|
||||
import "./unittests/tscWatch/incremental";
|
||||
import "./unittests/tscWatch/libraryResolution";
|
||||
import "./unittests/tscWatch/moduleResolution";
|
||||
import "./unittests/tscWatch/programUpdates";
|
||||
import "./unittests/tscWatch/projectsWithReferences";
|
||||
import "./unittests/tscWatch/resolutionCache";
|
||||
import "./unittests/tscWatch/resolveJsonModuleWithIncremental";
|
||||
import "./unittests/tscWatch/sourceOfProjectReferenceRedirect";
|
||||
import "./unittests/tscWatch/symlinks";
|
||||
import "./unittests/tscWatch/watchApi";
|
||||
import "./unittests/tscWatch/watchEnvironment";
|
||||
import "./unittests/tsserver/applyChangesToOpenFiles";
|
||||
import "./unittests/tsserver/autoImportProvider";
|
||||
import "./unittests/tsserver/auxiliaryProject";
|
||||
import "./unittests/tsserver/cachingFileSystemInformation";
|
||||
import "./unittests/tsserver/cancellationToken";
|
||||
import "./unittests/tsserver/codeFix";
|
||||
import "./unittests/tsserver/compileOnSave";
|
||||
import "./unittests/tsserver/completions";
|
||||
import "./unittests/tsserver/completionsIncomplete";
|
||||
import "./unittests/tsserver/configFileSearch";
|
||||
import "./unittests/tsserver/configuredProjects";
|
||||
import "./unittests/tsserver/declarationFileMaps";
|
||||
import "./unittests/tsserver/documentRegistry";
|
||||
import "./unittests/tsserver/duplicatePackages";
|
||||
import "./unittests/tsserver/dynamicFiles";
|
||||
import "./unittests/tsserver/events/largeFileReferenced";
|
||||
import "./unittests/tsserver/events/projectLanguageServiceState";
|
||||
import "./unittests/tsserver/events/projectLoading";
|
||||
import "./unittests/tsserver/events/projectUpdatedInBackground";
|
||||
import "./unittests/tsserver/events/watchEvents";
|
||||
import "./unittests/tsserver/exportMapCache";
|
||||
import "./unittests/tsserver/extends";
|
||||
import "./unittests/tsserver/externalProjects";
|
||||
import "./unittests/tsserver/findAllReferences";
|
||||
import "./unittests/tsserver/forceConsistentCasingInFileNames";
|
||||
import "./unittests/tsserver/formatSettings";
|
||||
import "./unittests/tsserver/getApplicableRefactors";
|
||||
import "./unittests/tsserver/getEditsForFileRename";
|
||||
import "./unittests/tsserver/getExportReferences";
|
||||
import "./unittests/tsserver/getFileReferences";
|
||||
import "./unittests/tsserver/goToDefinition";
|
||||
import "./unittests/tsserver/importHelpers";
|
||||
import "./unittests/tsserver/inlayHints";
|
||||
import "./unittests/tsserver/inferredProjects";
|
||||
import "./unittests/tsserver/jsdocTag";
|
||||
import "./unittests/tsserver/languageService";
|
||||
import "./unittests/tsserver/libraryResolution";
|
||||
import "./unittests/tsserver/maxNodeModuleJsDepth";
|
||||
import "./unittests/tsserver/metadataInResponse";
|
||||
import "./unittests/tsserver/moduleResolution";
|
||||
import "./unittests/tsserver/moduleSpecifierCache";
|
||||
import "./unittests/tsserver/navTo";
|
||||
import "./unittests/tsserver/occurences";
|
||||
import "./unittests/tsserver/openFile";
|
||||
import "./unittests/tsserver/packageJsonInfo";
|
||||
import "./unittests/tsserver/partialSemanticServer";
|
||||
import "./unittests/tsserver/plugins";
|
||||
import "./unittests/tsserver/pluginsAsync";
|
||||
import "./unittests/tsserver/projectErrors";
|
||||
import "./unittests/tsserver/projectReferenceCompileOnSave";
|
||||
import "./unittests/tsserver/projectReferenceErrors";
|
||||
import "./unittests/tsserver/projectReferences";
|
||||
import "./unittests/tsserver/projectReferencesSourcemap";
|
||||
import "./unittests/tsserver/projects";
|
||||
import "./unittests/tsserver/projectsWithReferences";
|
||||
import "./unittests/tsserver/refactors";
|
||||
import "./unittests/tsserver/reload";
|
||||
import "./unittests/tsserver/reloadProjects";
|
||||
import "./unittests/tsserver/rename";
|
||||
import "./unittests/tsserver/resolutionCache";
|
||||
import "./unittests/tsserver/session";
|
||||
import "./unittests/tsserver/skipLibCheck";
|
||||
import "./unittests/tsserver/smartSelection";
|
||||
import "./unittests/tsserver/symlinkCache";
|
||||
import "./unittests/tsserver/symLinks";
|
||||
import "./unittests/tsserver/syntacticServer";
|
||||
import "./unittests/tsserver/syntaxOperations";
|
||||
import "./unittests/tsserver/textStorage";
|
||||
import "./unittests/tsserver/telemetry";
|
||||
import "./unittests/tsserver/typeAquisition";
|
||||
import "./unittests/tsserver/typeOnlyImportChains";
|
||||
import "./unittests/tsserver/typeReferenceDirectives";
|
||||
import "./unittests/tsserver/typingsInstaller";
|
||||
import "./unittests/tsserver/versionCache";
|
||||
import "./unittests/tsserver/watchEnvironment";
|
||||
import "./unittests/debugDeprecation";
|
||||
import "./unittests/tsserver/inconsistentErrorInEditor";
|
||||
import "./unittests/tsserver/getMoveToRefactoringFileSuggestions";
|
||||
import "./unittests/skipJSDocParsing";
|
||||
export * from "./unittests/asserts.js";
|
||||
export * from "./unittests/base64.js";
|
||||
export * from "./unittests/builder.js";
|
||||
export * from "./unittests/canWatch.js";
|
||||
export * from "./unittests/comments.js";
|
||||
export * from "./unittests/compilerCore.js";
|
||||
export * from "./unittests/config/commandLineParsing.js";
|
||||
export * from "./unittests/config/configurationExtension.js";
|
||||
export * from "./unittests/config/convertCompilerOptionsFromJson.js";
|
||||
export * from "./unittests/config/convertTypeAcquisitionFromJson.js";
|
||||
export * from "./unittests/config/initializeTSConfig.js";
|
||||
export * from "./unittests/config/matchFiles.js";
|
||||
export * from "./unittests/config/showConfig.js";
|
||||
export * from "./unittests/config/tsconfigParsing.js";
|
||||
export * from "./unittests/config/tsconfigParsingWatchOptions.js";
|
||||
export * from "./unittests/convertToBase64.js";
|
||||
export * from "./unittests/customTransforms.js";
|
||||
export * from "./unittests/debugDeprecation.js";
|
||||
export * from "./unittests/diagnosticCollection.js";
|
||||
export * from "./unittests/evaluation/arraySpread.js";
|
||||
export * from "./unittests/evaluation/asyncArrow.js";
|
||||
export * from "./unittests/evaluation/asyncGenerator.js";
|
||||
export * from "./unittests/evaluation/autoAccessors.js";
|
||||
export * from "./unittests/evaluation/awaiter.js";
|
||||
export * from "./unittests/evaluation/awaitUsingDeclarations.js";
|
||||
export * from "./unittests/evaluation/constEnum.js";
|
||||
export * from "./unittests/evaluation/destructuring.js";
|
||||
export * from "./unittests/evaluation/esDecorators.js";
|
||||
export * from "./unittests/evaluation/esDecoratorsMetadata.js";
|
||||
export * from "./unittests/evaluation/externalModules.js";
|
||||
export * from "./unittests/evaluation/forAwaitOf.js";
|
||||
export * from "./unittests/evaluation/forOf.js";
|
||||
export * from "./unittests/evaluation/generator.js";
|
||||
export * from "./unittests/evaluation/objectRest.js";
|
||||
export * from "./unittests/evaluation/optionalCall.js";
|
||||
export * from "./unittests/evaluation/superInStaticInitializer.js";
|
||||
export * from "./unittests/evaluation/templateLiteral.js";
|
||||
export * from "./unittests/evaluation/updateExpressionInModule.js";
|
||||
export * from "./unittests/evaluation/usingDeclarations.js";
|
||||
export * from "./unittests/factory.js";
|
||||
export * from "./unittests/incrementalParser.js";
|
||||
export * from "./unittests/jsDocParsing.js";
|
||||
export * from "./unittests/jsonParserRecovery.js";
|
||||
export * from "./unittests/moduleResolution.js";
|
||||
export * from "./unittests/parsePseudoBigInt.js";
|
||||
export * from "./unittests/paths.js";
|
||||
export * from "./unittests/printer.js";
|
||||
export * from "./unittests/programApi.js";
|
||||
export * from "./unittests/publicApi.js";
|
||||
export * from "./unittests/reuseProgramStructure.js";
|
||||
export * from "./unittests/semver.js";
|
||||
export * from "./unittests/services/cancellableLanguageServiceOperations.js";
|
||||
export * from "./unittests/services/colorization.js";
|
||||
export * from "./unittests/services/convertToAsyncFunction.js";
|
||||
export * from "./unittests/services/documentRegistry.js";
|
||||
export * from "./unittests/services/extract/constants.js";
|
||||
export * from "./unittests/services/extract/functions.js";
|
||||
export * from "./unittests/services/extract/ranges.js";
|
||||
export * from "./unittests/services/extract/symbolWalker.js";
|
||||
export * from "./unittests/services/hostNewLineSupport.js";
|
||||
export * from "./unittests/services/languageService.js";
|
||||
export * from "./unittests/services/organizeImports.js";
|
||||
export * from "./unittests/services/patternMatcher.js";
|
||||
export * from "./unittests/services/preProcessFile.js";
|
||||
export * from "./unittests/services/textChanges.js";
|
||||
export * from "./unittests/services/transpile.js";
|
||||
export * from "./unittests/services/utilities.js";
|
||||
export * from "./unittests/skipJSDocParsing.js";
|
||||
export * from "./unittests/sys/symlinkWatching.js";
|
||||
export * from "./unittests/transform.js";
|
||||
export * from "./unittests/tsbuild/amdModulesWithOut.js";
|
||||
export * from "./unittests/tsbuild/clean.js";
|
||||
export * from "./unittests/tsbuild/commandLine.js";
|
||||
export * from "./unittests/tsbuild/configFileErrors.js";
|
||||
export * from "./unittests/tsbuild/configFileExtends.js";
|
||||
export * from "./unittests/tsbuild/containerOnlyReferenced.js";
|
||||
export * from "./unittests/tsbuild/declarationEmit.js";
|
||||
export * from "./unittests/tsbuild/demo.js";
|
||||
export * from "./unittests/tsbuild/emitDeclarationOnly.js";
|
||||
export * from "./unittests/tsbuild/emptyFiles.js";
|
||||
export * from "./unittests/tsbuild/exitCodeOnBogusFile.js";
|
||||
export * from "./unittests/tsbuild/extends.js";
|
||||
export * from "./unittests/tsbuild/fileDelete.js";
|
||||
export * from "./unittests/tsbuild/graphOrdering.js";
|
||||
export * from "./unittests/tsbuild/inferredTypeFromTransitiveModule.js";
|
||||
export * from "./unittests/tsbuild/javascriptProjectEmit.js";
|
||||
export * from "./unittests/tsbuild/lateBoundSymbol.js";
|
||||
export * from "./unittests/tsbuild/libraryResolution.js";
|
||||
export * from "./unittests/tsbuild/moduleResolution.js";
|
||||
export * from "./unittests/tsbuild/moduleSpecifiers.js";
|
||||
export * from "./unittests/tsbuild/noCheck.js";
|
||||
export * from "./unittests/tsbuild/noEmit.js";
|
||||
export * from "./unittests/tsbuild/noEmitOnError.js";
|
||||
export * from "./unittests/tsbuild/outFile.js";
|
||||
export * from "./unittests/tsbuild/outputPaths.js";
|
||||
export * from "./unittests/tsbuild/publicApi.js";
|
||||
export * from "./unittests/tsbuild/referencesWithRootDirInParent.js";
|
||||
export * from "./unittests/tsbuild/resolveJsonModule.js";
|
||||
export * from "./unittests/tsbuild/roots.js";
|
||||
export * from "./unittests/tsbuild/sample.js";
|
||||
export * from "./unittests/tsbuild/transitiveReferences.js";
|
||||
export * from "./unittests/tsbuildWatch/configFileErrors.js";
|
||||
export * from "./unittests/tsbuildWatch/demo.js";
|
||||
export * from "./unittests/tsbuildWatch/extends.js";
|
||||
export * from "./unittests/tsbuildWatch/libraryResolution.js";
|
||||
export * from "./unittests/tsbuildWatch/moduleResolution.js";
|
||||
export * from "./unittests/tsbuildWatch/noEmit.js";
|
||||
export * from "./unittests/tsbuildWatch/noEmitOnError.js";
|
||||
export * from "./unittests/tsbuildWatch/programUpdates.js";
|
||||
export * from "./unittests/tsbuildWatch/projectsBuilding.js";
|
||||
export * from "./unittests/tsbuildWatch/publicApi.js";
|
||||
export * from "./unittests/tsbuildWatch/reexport.js";
|
||||
export * from "./unittests/tsbuildWatch/watchEnvironment.js";
|
||||
export * from "./unittests/tsc/cancellationToken.js";
|
||||
export * from "./unittests/tsc/composite.js";
|
||||
export * from "./unittests/tsc/declarationEmit.js";
|
||||
export * from "./unittests/tsc/extends.js";
|
||||
export * from "./unittests/tsc/forceConsistentCasingInFileNames.js";
|
||||
export * from "./unittests/tsc/incremental.js";
|
||||
export * from "./unittests/tsc/libraryResolution.js";
|
||||
export * from "./unittests/tsc/listFilesOnly.js";
|
||||
export * from "./unittests/tsc/moduleResolution.js";
|
||||
export * from "./unittests/tsc/projectReferences.js";
|
||||
export * from "./unittests/tsc/projectReferencesConfig.js";
|
||||
export * from "./unittests/tsc/redirect.js";
|
||||
export * from "./unittests/tsc/runWithoutArgs.js";
|
||||
export * from "./unittests/tscWatch/consoleClearing.js";
|
||||
export * from "./unittests/tscWatch/emit.js";
|
||||
export * from "./unittests/tscWatch/emitAndErrorUpdates.js";
|
||||
export * from "./unittests/tscWatch/extends.js";
|
||||
export * from "./unittests/tscWatch/forceConsistentCasingInFileNames.js";
|
||||
export * from "./unittests/tscWatch/incremental.js";
|
||||
export * from "./unittests/tscWatch/libraryResolution.js";
|
||||
export * from "./unittests/tscWatch/moduleResolution.js";
|
||||
export * from "./unittests/tscWatch/nodeNextWatch.js";
|
||||
export * from "./unittests/tscWatch/programUpdates.js";
|
||||
export * from "./unittests/tscWatch/projectsWithReferences.js";
|
||||
export * from "./unittests/tscWatch/resolutionCache.js";
|
||||
export * from "./unittests/tscWatch/resolveJsonModuleWithIncremental.js";
|
||||
export * from "./unittests/tscWatch/sourceOfProjectReferenceRedirect.js";
|
||||
export * from "./unittests/tscWatch/symlinks.js";
|
||||
export * from "./unittests/tscWatch/watchApi.js";
|
||||
export * from "./unittests/tscWatch/watchEnvironment.js";
|
||||
export * from "./unittests/tsserver/applyChangesToOpenFiles.js";
|
||||
export * from "./unittests/tsserver/autoImportProvider.js";
|
||||
export * from "./unittests/tsserver/auxiliaryProject.js";
|
||||
export * from "./unittests/tsserver/cachingFileSystemInformation.js";
|
||||
export * from "./unittests/tsserver/cancellationToken.js";
|
||||
export * from "./unittests/tsserver/codeFix.js";
|
||||
export * from "./unittests/tsserver/compileOnSave.js";
|
||||
export * from "./unittests/tsserver/completions.js";
|
||||
export * from "./unittests/tsserver/completionsIncomplete.js";
|
||||
export * from "./unittests/tsserver/configFileSearch.js";
|
||||
export * from "./unittests/tsserver/configuredProjects.js";
|
||||
export * from "./unittests/tsserver/declarationFileMaps.js";
|
||||
export * from "./unittests/tsserver/documentRegistry.js";
|
||||
export * from "./unittests/tsserver/duplicatePackages.js";
|
||||
export * from "./unittests/tsserver/dynamicFiles.js";
|
||||
export * from "./unittests/tsserver/events/largeFileReferenced.js";
|
||||
export * from "./unittests/tsserver/events/projectLanguageServiceState.js";
|
||||
export * from "./unittests/tsserver/events/projectLoading.js";
|
||||
export * from "./unittests/tsserver/events/projectUpdatedInBackground.js";
|
||||
export * from "./unittests/tsserver/events/watchEvents.js";
|
||||
export * from "./unittests/tsserver/exportMapCache.js";
|
||||
export * from "./unittests/tsserver/extends.js";
|
||||
export * from "./unittests/tsserver/externalProjects.js";
|
||||
export * from "./unittests/tsserver/findAllReferences.js";
|
||||
export * from "./unittests/tsserver/forceConsistentCasingInFileNames.js";
|
||||
export * from "./unittests/tsserver/formatSettings.js";
|
||||
export * from "./unittests/tsserver/getApplicableRefactors.js";
|
||||
export * from "./unittests/tsserver/getEditsForFileRename.js";
|
||||
export * from "./unittests/tsserver/getExportReferences.js";
|
||||
export * from "./unittests/tsserver/getFileReferences.js";
|
||||
export * from "./unittests/tsserver/getMoveToRefactoringFileSuggestions.js";
|
||||
export * from "./unittests/tsserver/goToDefinition.js";
|
||||
export * from "./unittests/tsserver/importHelpers.js";
|
||||
export * from "./unittests/tsserver/inconsistentErrorInEditor.js";
|
||||
export * from "./unittests/tsserver/inferredProjects.js";
|
||||
export * from "./unittests/tsserver/inlayHints.js";
|
||||
export * from "./unittests/tsserver/jsdocTag.js";
|
||||
export * from "./unittests/tsserver/languageService.js";
|
||||
export * from "./unittests/tsserver/libraryResolution.js";
|
||||
export * from "./unittests/tsserver/maxNodeModuleJsDepth.js";
|
||||
export * from "./unittests/tsserver/metadataInResponse.js";
|
||||
export * from "./unittests/tsserver/moduleResolution.js";
|
||||
export * from "./unittests/tsserver/moduleSpecifierCache.js";
|
||||
export * from "./unittests/tsserver/navTo.js";
|
||||
export * from "./unittests/tsserver/occurences.js";
|
||||
export * from "./unittests/tsserver/openFile.js";
|
||||
export * from "./unittests/tsserver/packageJsonInfo.js";
|
||||
export * from "./unittests/tsserver/partialSemanticServer.js";
|
||||
export * from "./unittests/tsserver/plugins.js";
|
||||
export * from "./unittests/tsserver/pluginsAsync.js";
|
||||
export * from "./unittests/tsserver/projectErrors.js";
|
||||
export * from "./unittests/tsserver/projectReferenceCompileOnSave.js";
|
||||
export * from "./unittests/tsserver/projectReferenceErrors.js";
|
||||
export * from "./unittests/tsserver/projectReferences.js";
|
||||
export * from "./unittests/tsserver/projectReferencesSourcemap.js";
|
||||
export * from "./unittests/tsserver/projects.js";
|
||||
export * from "./unittests/tsserver/projectsWithReferences.js";
|
||||
export * from "./unittests/tsserver/refactors.js";
|
||||
export * from "./unittests/tsserver/reload.js";
|
||||
export * from "./unittests/tsserver/reloadProjects.js";
|
||||
export * from "./unittests/tsserver/rename.js";
|
||||
export * from "./unittests/tsserver/resolutionCache.js";
|
||||
export * from "./unittests/tsserver/session.js";
|
||||
export * from "./unittests/tsserver/skipLibCheck.js";
|
||||
export * from "./unittests/tsserver/smartSelection.js";
|
||||
export * from "./unittests/tsserver/symlinkCache.js";
|
||||
export * from "./unittests/tsserver/symLinks.js";
|
||||
export * from "./unittests/tsserver/syntacticServer.js";
|
||||
export * from "./unittests/tsserver/syntaxOperations.js";
|
||||
export * from "./unittests/tsserver/telemetry.js";
|
||||
export * from "./unittests/tsserver/textStorage.js";
|
||||
export * from "./unittests/tsserver/typeAquisition.js";
|
||||
export * from "./unittests/tsserver/typeOnlyImportChains.js";
|
||||
export * from "./unittests/tsserver/typeReferenceDirectives.js";
|
||||
export * from "./unittests/tsserver/typingsInstaller.js";
|
||||
export * from "./unittests/tsserver/versionCache.js";
|
||||
export * from "./unittests/tsserver/watchEnvironment.js";
|
||||
export * from "./unittests/typeParameterIsPossiblyReferenced.js";
|
||||
|
||||
@@ -6,9 +6,9 @@ import {
|
||||
RunnerBase,
|
||||
TestCaseParser,
|
||||
TestRunnerKind,
|
||||
} from "./_namespaces/Harness";
|
||||
import * as ts from "./_namespaces/ts";
|
||||
import * as vpath from "./_namespaces/vpath";
|
||||
} from "./_namespaces/Harness.js";
|
||||
import * as ts from "./_namespaces/ts.js";
|
||||
import * as vpath from "./_namespaces/vpath.js";
|
||||
|
||||
export class TranspileRunner extends RunnerBase {
|
||||
protected basePath = "tests/cases/transpile";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: assert", () => {
|
||||
it("deepEqual", () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: base64", () => {
|
||||
describe("base64decode", () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
import {
|
||||
NamedSourceText,
|
||||
newProgram,
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
SourceText,
|
||||
updateProgram,
|
||||
updateProgramText,
|
||||
} from "./helpers";
|
||||
} from "./helpers.js";
|
||||
|
||||
describe("unittests:: builder", () => {
|
||||
it("emits dependent files", () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Baseline } from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import { Baseline } from "../_namespaces/Harness.js";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
describe("unittests:: canWatch::", () => {
|
||||
baselineCanWatch(
|
||||
"canWatchDirectoryOrFile",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
describe("comment parsing", () => {
|
||||
const withShebang = `#! node
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: compilerCore", () => {
|
||||
describe("equalOwnProperties", () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import * as Harness from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
|
||||
describe("unittests:: config:: commandLineParsing:: parseCommandLine", () => {
|
||||
function assertParseResult(subScenario: string, commandLine: string[], workerDiagnostic?: () => ts.ParseCommandLineWorkerDiagnostics) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import * as fakes from "../../_namespaces/fakes.js";
|
||||
import * as Harness from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import * as vfs from "../../_namespaces/vfs.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import {
|
||||
baselineParseConfig,
|
||||
baselineParseConfigHost,
|
||||
} from "./helpers";
|
||||
} from "./helpers.js";
|
||||
|
||||
function createFileSystem(ignoreCase: boolean, cwd: string, root: string) {
|
||||
return new vfs.FileSystem(ignoreCase, {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { baselineParseConfig } from "./helpers";
|
||||
import * as fakes from "../../_namespaces/fakes.js";
|
||||
import * as vfs from "../../_namespaces/vfs.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import { baselineParseConfig } from "./helpers.js";
|
||||
|
||||
describe("unittests:: config:: convertCompilerOptionsFromJson", () => {
|
||||
function baselineCompilerOptions(subScenario: string, json: any, configFileName: string) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { baselineParseConfig } from "./helpers";
|
||||
import * as fakes from "../../_namespaces/fakes.js";
|
||||
import * as vfs from "../../_namespaces/vfs.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import { baselineParseConfig } from "./helpers.js";
|
||||
|
||||
describe("unittests:: config:: convertTypeAcquisitionFromJson", () => {
|
||||
function baselineTypeAcquisition(subScenario: string, json: any, configFileName: string) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import * as fakes from "../../_namespaces/fakes.js";
|
||||
import * as Harness from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import * as vfs from "../../_namespaces/vfs.js";
|
||||
|
||||
function getParsedCommandJson(
|
||||
jsonText: string,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as Harness from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: config:: initTSConfig", () => {
|
||||
function initTSConfigCorrectly(name: string, commandLinesArgs: string[]) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { baselineParseConfig } from "./helpers";
|
||||
import * as fakes from "../../_namespaces/fakes.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import * as vfs from "../../_namespaces/vfs.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import { baselineParseConfig } from "./helpers.js";
|
||||
|
||||
const caseInsensitiveBasePath = "c:/dev/";
|
||||
const caseInsensitiveTsconfigPath = "c:/dev/tsconfig.json";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as Harness from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: config:: showConfig", () => {
|
||||
function showTSConfigCorrectly(name: string, commandLinesArgs: string[], configJson?: object) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { baselineParseConfig } from "./helpers";
|
||||
import * as fakes from "../../_namespaces/fakes.js";
|
||||
import * as Harness from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import * as vfs from "../../_namespaces/vfs.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import { baselineParseConfig } from "./helpers.js";
|
||||
|
||||
describe("unittests:: config:: tsconfigParsing:: parseConfigFileTextToJson", () => {
|
||||
function formatErrors(errors: readonly ts.Diagnostic[]) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { baselineParseConfig } from "./helpers";
|
||||
import * as fakes from "../../_namespaces/fakes.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import * as vfs from "../../_namespaces/vfs.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import { baselineParseConfig } from "./helpers.js";
|
||||
|
||||
describe("unittests:: config:: tsconfigParsingWatchOptions:: parseConfigFileTextToJson", () => {
|
||||
interface VerifyWatchOptions {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: convertToBase64", () => {
|
||||
function runTest(input: string): void {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as Harness from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as Harness from "../_namespaces/Harness.js";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: customTransforms", () => {
|
||||
function emitsCorrectly(name: string, sources: { file: string; text: string; }[], customTransformers: ts.CustomTransformers, options: ts.CompilerOptions = {}) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { deprecate } from "../../deprecatedCompat/deprecate";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import { deprecate } from "../../deprecatedCompat/deprecate.js";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: debugDeprecation", () => {
|
||||
let loggingHost: ts.LoggingHost | undefined;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: internalApi:: diagnosticCollection", () => {
|
||||
describe("add", () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
|
||||
describe("unittests:: evaluation:: arraySpread", () => {
|
||||
it("array spread preserves side-effects", async () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
|
||||
describe("unittests:: evaluation:: asyncArrowEvaluation", () => {
|
||||
// https://github.com/Microsoft/TypeScript/issues/24722
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: evaluation:: asyncGeneratorEvaluation", () => {
|
||||
it("return (es5)", async () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: evaluation:: autoAccessors", () => {
|
||||
const editions = [
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
function FakeSuppressedError(error: any, suppressed: any) {
|
||||
return { error, suppressed };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
|
||||
describe("unittests:: evaluation:: awaiter", () => {
|
||||
// NOTE: This could break if the ECMAScript spec ever changes the timing behavior for Promises (again)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
|
||||
describe("unittests:: evaluation:: constEnum", () => {
|
||||
it("correct order of operations for inlined negative numbers", async () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: evaluation:: destructuring", () => {
|
||||
// https://github.com/microsoft/TypeScript/issues/39205
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import { ScriptTarget } from "../../_namespaces/ts";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import { ScriptTarget } from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: evaluation:: esDecorators", () => {
|
||||
const options: ts.CompilerOptions = { target: ts.ScriptTarget.ES2021 };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import { ScriptTarget } from "../../_namespaces/ts";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import { ScriptTarget } from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: evaluation:: esDecoratorsMetadata", () => {
|
||||
const nodeVersion = new ts.Version(process.versions.node);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
|
||||
describe("unittests:: evaluation:: externalModules", () => {
|
||||
// https://github.com/microsoft/TypeScript/issues/35420
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: evaluation:: forAwaitOfEvaluation", () => {
|
||||
it("sync (es5)", async () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: evaluation:: forOfEvaluation", () => {
|
||||
it("es5 over a array with no Symbol", () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: evaluation:: generatorEvaluation", () => {
|
||||
it("throw before start (es5)", () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
|
||||
describe("unittests:: evaluation:: objectRest", () => {
|
||||
// https://github.com/microsoft/TypeScript/issues/31469
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
|
||||
describe("unittests:: evaluation:: optionalCall", () => {
|
||||
it("f?.()", async () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: evaluation:: superInStaticInitializer", () => {
|
||||
it("super-property-get in es2015", () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
|
||||
describe("unittests:: evaluation:: templateLiteral", () => {
|
||||
it("toString() over valueOf()", () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: evaluation:: updateExpressionInModule", () => {
|
||||
// only run BigInt tests if BigInt is supported in the host environment
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as evaluator from "../../_namespaces/evaluator";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as evaluator from "../../_namespaces/evaluator.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
function FakeSuppressedError(error: any, suppressed: any) {
|
||||
return { error, suppressed };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: FactoryAPI", () => {
|
||||
function assertSyntaxKind(node: ts.Node, expected: ts.SyntaxKind) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
const enum ChangedPart {
|
||||
none = 0,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { FsContents } from "./contents";
|
||||
import { libFile } from "./virtualFileSystemWithWatch";
|
||||
import { dedent } from "../../_namespaces/Utils.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import { FsContents } from "./contents.js";
|
||||
import { libFile } from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export function getFsConentsForAlternateResultAtTypesPackageJson(packageName: string, addTypesCondition: boolean) {
|
||||
return jsonToReadableText({
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { TscCompileSystem } from "./tsc";
|
||||
import { TestServerHost } from "./virtualFileSystemWithWatch";
|
||||
import * as fakes from "../../_namespaces/fakes.js";
|
||||
import * as Harness from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import { TscCompileSystem } from "./tsc.js";
|
||||
import { TestServerHost } from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export type CommandLineProgram = [ts.Program, ts.BuilderProgram?];
|
||||
export interface CommandLineCallbacks {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import { libFile } from "./virtualFileSystemWithWatch";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import { libFile } from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export function compilerOptionsToConfigJson(options: ts.CompilerOptions) {
|
||||
return ts.optionMapToObject(ts.serializeCompilerOptions(options));
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import {
|
||||
FsContents,
|
||||
libContent,
|
||||
} from "./contents";
|
||||
import { loadProjectFromFiles } from "./vfs";
|
||||
} from "./contents.js";
|
||||
import { loadProjectFromFiles } from "./vfs.js";
|
||||
import {
|
||||
createWatchedSystem,
|
||||
libFile,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
} from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export function getFsContentsForDemoProjectReferencesCoreConfig(additional?: object) {
|
||||
return jsonToReadableText({
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { FsContents } from "./contents";
|
||||
import { dedent } from "../../_namespaces/Utils.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import { FsContents } from "./contents.js";
|
||||
import {
|
||||
createServerHost,
|
||||
createWatchedSystem,
|
||||
libFile,
|
||||
TestServerHost,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
} from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export function getSymlinkedExtendsSys(forTsserver?: true): TestServerHost {
|
||||
return (!forTsserver ? createWatchedSystem : createServerHost)({
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import {
|
||||
FsContents,
|
||||
libContent,
|
||||
} from "./contents";
|
||||
import { libFile } from "./virtualFileSystemWithWatch";
|
||||
} from "./contents.js";
|
||||
import { libFile } from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export function getFsContentsForMultipleErrorsForceConsistentCasingInFileNames(): FsContents {
|
||||
return {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import {
|
||||
FsContents,
|
||||
libContent,
|
||||
} from "./contents";
|
||||
import { loadProjectFromFiles } from "./vfs";
|
||||
} from "./contents.js";
|
||||
import { loadProjectFromFiles } from "./vfs.js";
|
||||
import {
|
||||
createServerHost,
|
||||
createWatchedSystem,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
} from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
function getFsContentsForLibResolution(libRedirection?: boolean): FsContents {
|
||||
return {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { libContent } from "./contents";
|
||||
import { solutionBuildWithBaseline } from "./solutionBuilder";
|
||||
import { dedent } from "../../_namespaces/Utils.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import { libContent } from "./contents.js";
|
||||
import { solutionBuildWithBaseline } from "./solutionBuilder.js";
|
||||
import {
|
||||
createServerHost,
|
||||
createWatchedSystem,
|
||||
TestServerHost,
|
||||
TestServerHostOsFlavor,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
} from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export function getMonorepoSymlinkedSiblingPackagesSys(forTsserver: boolean, built: boolean, osFlavor?: TestServerHostOsFlavor): TestServerHost {
|
||||
const configText = jsonToReadableText({
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import {
|
||||
FsContents,
|
||||
libContent,
|
||||
} from "./contents";
|
||||
import { loadProjectFromFiles } from "./vfs";
|
||||
} from "./contents.js";
|
||||
import { loadProjectFromFiles } from "./vfs.js";
|
||||
import {
|
||||
createWatchedSystem,
|
||||
libFile,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
} from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export function getFsContentsForNoEmitOnError(): FsContents {
|
||||
return {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import {
|
||||
FsContents,
|
||||
getProjectConfigWithNodeNext,
|
||||
} from "./contents";
|
||||
import { loadProjectFromFiles } from "./vfs";
|
||||
} from "./contents.js";
|
||||
import { loadProjectFromFiles } from "./vfs.js";
|
||||
import {
|
||||
createServerHost,
|
||||
createWatchedSystem,
|
||||
libFile,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
} from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export function getFsContentsForSampleProjectReferencesLogicConfig(withNodeNext?: boolean) {
|
||||
return jsonToReadableText({
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { commandLineCallbacks } from "./baseline";
|
||||
import * as fakes from "../../_namespaces/fakes.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import { commandLineCallbacks } from "./baseline.js";
|
||||
import {
|
||||
makeSystemReadyForBaseline,
|
||||
TscCompileSystem,
|
||||
} from "./tsc";
|
||||
} from "./tsc.js";
|
||||
import {
|
||||
changeToHostTrackingWrittenFiles,
|
||||
TestServerHost,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
} from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export function createSolutionBuilderHostForBaseline(
|
||||
sys: TscCompileSystem | TestServerHost,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { dedent } from "../../_namespaces/Utils";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { dedent } from "../../_namespaces/Utils.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import {
|
||||
FsContents,
|
||||
getProjectConfigWithNodeNext,
|
||||
libContent,
|
||||
} from "./contents";
|
||||
import { libFile } from "./virtualFileSystemWithWatch";
|
||||
} from "./contents.js";
|
||||
import { libFile } from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export function getFsContentsForTransitiveReferencesRefsAdts() {
|
||||
return dedent`
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as fakes from "../../_namespaces/fakes";
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import * as fakes from "../../_namespaces/fakes.js";
|
||||
import * as Harness from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import * as vfs from "../../_namespaces/vfs.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import {
|
||||
baselinePrograms,
|
||||
CommandLineCallbacks,
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
ReadableProgramMultiFileEmitBuildInfo,
|
||||
toPathWithSystem,
|
||||
tscBaselineName,
|
||||
} from "./baseline";
|
||||
} from "./baseline.js";
|
||||
|
||||
export type TscCompileSystem = fakes.System & {
|
||||
writtenFiles: Set<ts.Path>;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {
|
||||
verifyProgramStructure,
|
||||
verifyResolutionCache,
|
||||
} from "../../../harness/incrementalUtils";
|
||||
import { patchHostForBuildInfoReadWrite } from "../../_namespaces/fakes";
|
||||
import { Baseline } from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
} from "../../../harness/incrementalUtils.js";
|
||||
import { patchHostForBuildInfoReadWrite } from "../../_namespaces/fakes.js";
|
||||
import { Baseline } from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import {
|
||||
baselinePrograms,
|
||||
CommandLineCallbacks,
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
CommandLineProgram,
|
||||
generateSourceMapBaselineFiles,
|
||||
tscBaselineName,
|
||||
} from "./baseline";
|
||||
} from "./baseline.js";
|
||||
import {
|
||||
changeToHostTrackingWrittenFiles,
|
||||
File,
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
StateLogger,
|
||||
TestServerHost,
|
||||
TestServerHostTrackingWrittenFiles,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
} from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export const commonFile1: File = {
|
||||
path: "/a/b/commonFile1.ts",
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import { incrementalVerifier } from "../../../harness/incrementalUtils";
|
||||
import { patchServiceForStateBaseline } from "../../../harness/projectServiceStateLogger";
|
||||
import { incrementalVerifier } from "../../../harness/incrementalUtils.js";
|
||||
import { patchServiceForStateBaseline } from "../../../harness/projectServiceStateLogger.js";
|
||||
import {
|
||||
createLoggerWithInMemoryLogs,
|
||||
LoggerWithInMemoryLogs,
|
||||
} from "../../../harness/tsserverLogger";
|
||||
import { patchHostForBuildInfoReadWrite } from "../../_namespaces/fakes";
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import { ensureErrorFreeBuild } from "./solutionBuilder";
|
||||
} from "../../../harness/tsserverLogger.js";
|
||||
import { patchHostForBuildInfoReadWrite } from "../../_namespaces/fakes.js";
|
||||
import * as Harness from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import { ensureErrorFreeBuild } from "./solutionBuilder.js";
|
||||
import {
|
||||
customTypesMap,
|
||||
TestTypingsInstallerAdapter,
|
||||
TestTypingsInstallerOptions,
|
||||
} from "./typingsInstaller";
|
||||
} from "./typingsInstaller.js";
|
||||
import {
|
||||
changeToHostTrackingWrittenFiles,
|
||||
createServerHost,
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
StateLogger,
|
||||
TestServerHost,
|
||||
TestServerHostTrackingWrittenFiles,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
} from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export function baselineTsserverLogs(scenario: string, subScenario: string, sessionOrService: { logger: LoggerWithInMemoryLogs; }) {
|
||||
Harness.Baseline.runBaseline(`tsserver/${scenario}/${subScenario.split(" ").join("-")}.js`, sessionOrService.logger.logs.join("\r\n"));
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import {
|
||||
LoggerWithInMemoryLogs,
|
||||
nowString,
|
||||
} from "../../../harness/tsserverLogger";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import { stringifyIndented } from "../../_namespaces/ts.server";
|
||||
import { jsonToReadableText } from "../helpers";
|
||||
import { TestSession } from "./tsserver";
|
||||
} from "../../../harness/tsserverLogger.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import { stringifyIndented } from "../../_namespaces/ts.server.js";
|
||||
import { jsonToReadableText } from "../helpers.js";
|
||||
import { TestSession } from "./tsserver.js";
|
||||
import {
|
||||
File,
|
||||
TestServerHost,
|
||||
} from "./virtualFileSystemWithWatch";
|
||||
} from "./virtualFileSystemWithWatch.js";
|
||||
|
||||
export const customTypesMap = {
|
||||
path: "/typesMap.json" as ts.Path,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { getDirectoryPath } from "../../_namespaces/ts";
|
||||
import * as vfs from "../../_namespaces/vfs";
|
||||
import { libContent } from "./contents";
|
||||
import { getDirectoryPath } from "../../_namespaces/ts.js";
|
||||
import * as vfs from "../../_namespaces/vfs.js";
|
||||
import { libContent } from "./contents.js";
|
||||
|
||||
export interface FsOptions {
|
||||
libContentToAppend?: string;
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
createWatchUtils,
|
||||
Watches,
|
||||
WatchUtils,
|
||||
} from "../../../harness/watchUtils";
|
||||
} from "../../../harness/watchUtils.js";
|
||||
import {
|
||||
arrayFrom,
|
||||
clear,
|
||||
@@ -43,9 +43,9 @@ import {
|
||||
SortedArray,
|
||||
sys,
|
||||
toPath,
|
||||
} from "../../_namespaces/ts";
|
||||
import { typingsInstaller } from "../../_namespaces/ts.server";
|
||||
import { timeIncrements } from "../../_namespaces/vfs";
|
||||
} from "../../_namespaces/ts.js";
|
||||
import { typingsInstaller } from "../../_namespaces/ts.server.js";
|
||||
import { timeIncrements } from "../../_namespaces/vfs.js";
|
||||
|
||||
export const libFile: File = {
|
||||
path: "/a/lib/lib.d.ts",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as Utils from "../_namespaces/Utils";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
import * as Utils from "../_namespaces/Utils.js";
|
||||
|
||||
function withChange(text: ts.IScriptSnapshot, start: number, length: number, newText: string): { text: ts.IScriptSnapshot; textChangeRange: ts.TextChangeRange; } {
|
||||
const contents = ts.getSnapshotText(text);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as Harness from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as Utils from "../_namespaces/Utils";
|
||||
import * as Harness from "../_namespaces/Harness.js";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
import * as Utils from "../_namespaces/Utils.js";
|
||||
|
||||
describe("unittests:: JSDocParsing", () => {
|
||||
describe("TypeExpressions", () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as Harness from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as Harness from "../_namespaces/Harness.js";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: jsonParserRecovery", () => {
|
||||
function parsesToValidSourceFileWithErrors(name: string, text: string) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as Harness from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import { jsonToReadableText } from "./helpers";
|
||||
import * as Harness from "../_namespaces/Harness.js";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
import { jsonToReadableText } from "./helpers.js";
|
||||
|
||||
interface File {
|
||||
name: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: BigInt literal base conversions", () => {
|
||||
describe("parsePseudoBigInt", () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: core paths", () => {
|
||||
it("normalizeSlashes", () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as fakes from "../_namespaces/fakes";
|
||||
import * as Harness from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as vfs from "../_namespaces/vfs";
|
||||
import * as fakes from "../_namespaces/fakes.js";
|
||||
import * as Harness from "../_namespaces/Harness.js";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
import * as vfs from "../_namespaces/vfs.js";
|
||||
|
||||
describe("unittests:: PrinterAPI", () => {
|
||||
function makePrintsCorrectly(prefix: string) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as documents from "../_namespaces/documents";
|
||||
import * as fakes from "../_namespaces/fakes";
|
||||
import * as Harness from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as vfs from "../_namespaces/vfs";
|
||||
import { jsonToReadableText } from "./helpers";
|
||||
import * as documents from "../_namespaces/documents.js";
|
||||
import * as fakes from "../_namespaces/fakes.js";
|
||||
import * as Harness from "../_namespaces/Harness.js";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
import * as vfs from "../_namespaces/vfs.js";
|
||||
import { jsonToReadableText } from "./helpers.js";
|
||||
|
||||
function verifyMissingFilePaths(missing: ReturnType<ts.Program["getMissingFilePaths"]>, expected: readonly string[]) {
|
||||
assert.isDefined(missing);
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import * as documents from "../_namespaces/documents";
|
||||
import * as fakes from "../_namespaces/fakes";
|
||||
import * as Harness from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as vfs from "../_namespaces/vfs";
|
||||
import { jsonToReadableText } from "./helpers";
|
||||
import { libContent } from "./helpers/contents";
|
||||
import { loadProjectFromFiles } from "./helpers/vfs";
|
||||
import * as documents from "../_namespaces/documents.js";
|
||||
import * as fakes from "../_namespaces/fakes.js";
|
||||
import * as Harness from "../_namespaces/Harness.js";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
import * as vfs from "../_namespaces/vfs.js";
|
||||
import { jsonToReadableText } from "./helpers.js";
|
||||
import { libContent } from "./helpers/contents.js";
|
||||
import { loadProjectFromFiles } from "./helpers/vfs.js";
|
||||
|
||||
describe("unittests:: Public APIs", () => {
|
||||
function verifyApi(fileName: string) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as Harness from "../_namespaces/Harness";
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as Utils from "../_namespaces/Utils";
|
||||
import * as Harness from "../_namespaces/Harness.js";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
import * as Utils from "../_namespaces/Utils.js";
|
||||
import {
|
||||
createTestCompilerHost,
|
||||
jsonToReadableText,
|
||||
@@ -12,12 +12,12 @@ import {
|
||||
TestCompilerHost,
|
||||
updateProgram,
|
||||
updateProgramText,
|
||||
} from "./helpers";
|
||||
} from "./helpers.js";
|
||||
import {
|
||||
createWatchedSystem,
|
||||
File,
|
||||
libFile,
|
||||
} from "./helpers/virtualFileSystemWithWatch";
|
||||
} from "./helpers/virtualFileSystemWithWatch.js";
|
||||
|
||||
describe("unittests:: reuseProgramStructure:: General", () => {
|
||||
type ProgramToBaseline = ts.Program & Pick<ProgramWithSourceTexts, "version">;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as ts from "../_namespaces/ts";
|
||||
import * as Utils from "../_namespaces/Utils";
|
||||
import * as ts from "../_namespaces/ts.js";
|
||||
import * as Utils from "../_namespaces/Utils.js";
|
||||
|
||||
import theory = Utils.theory;
|
||||
describe("unittests:: semver", () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as Harness from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: services:: cancellableLanguageServiceOperations", () => {
|
||||
const file = `
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as Harness from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
// lots of tests use quoted code
|
||||
/* eslint-disable no-template-curly-in-string */
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import * as Harness from "../../_namespaces/Harness";
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as Harness from "../../_namespaces/Harness.js";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
import {
|
||||
createServerHost,
|
||||
File,
|
||||
} from "../helpers/virtualFileSystemWithWatch";
|
||||
} from "../helpers/virtualFileSystemWithWatch.js";
|
||||
import {
|
||||
extractTest,
|
||||
newLineCharacter,
|
||||
notImplementedHost,
|
||||
TestProjectService,
|
||||
} from "./extract/helpers";
|
||||
} from "./extract/helpers.js";
|
||||
|
||||
const libFile: File = {
|
||||
path: "/a/lib/lib.d.ts",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as ts from "../../_namespaces/ts";
|
||||
import * as ts from "../../_namespaces/ts.js";
|
||||
|
||||
describe("unittests:: services:: DocumentRegistry", () => {
|
||||
it("documents are shared between projects", () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as ts from "../../../_namespaces/ts";
|
||||
import * as ts from "../../../_namespaces/ts.js";
|
||||
import {
|
||||
testExtractSymbol,
|
||||
testExtractSymbolFailed,
|
||||
} from "./helpers";
|
||||
} from "./helpers.js";
|
||||
|
||||
describe("unittests:: services:: extract:: extractConstants", () => {
|
||||
testExtractConstant("extractConstant_TopLevel", `let x = [#|1|];`);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user