mirror of
https://github.com/Microsoft/vscode
synced 2024-09-29 16:01:05 +00:00
This commit is contained in:
parent
b9226f2929
commit
13a88a8da4
|
@ -33,3 +33,4 @@
|
||||||
**/test/unit/assert.js
|
**/test/unit/assert.js
|
||||||
**/test/automation/out/**
|
**/test/automation/out/**
|
||||||
**/typings/**
|
**/typings/**
|
||||||
|
!.vscode
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*---------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
*--------------------------------------------------------*/
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { IstanbulCoverageContext } from 'istanbul-to-vscode';
|
import { IstanbulCoverageContext } from 'istanbul-to-vscode';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*---------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
*--------------------------------------------------------*/
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Debounces the function call for an interval.
|
* Debounces the function call for an interval.
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*---------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
*--------------------------------------------------------*/
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { randomBytes } from 'crypto';
|
import { randomBytes } from 'crypto';
|
||||||
import { tmpdir } from 'os';
|
import { tmpdir } from 'os';
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*---------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
*--------------------------------------------------------*/
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
import {
|
import {
|
||||||
|
@ -98,15 +99,15 @@ const formatJsonValue = (value: unknown) => {
|
||||||
context => (node: ts.Node) => {
|
context => (node: ts.Node) => {
|
||||||
const visitor = (node: ts.Node): ts.Node =>
|
const visitor = (node: ts.Node): ts.Node =>
|
||||||
ts.isPropertyAssignment(node) &&
|
ts.isPropertyAssignment(node) &&
|
||||||
ts.isStringLiteralLike(node.name) &&
|
ts.isStringLiteralLike(node.name) &&
|
||||||
identifierLikeRe.test(node.name.text)
|
identifierLikeRe.test(node.name.text)
|
||||||
? ts.factory.createPropertyAssignment(
|
? ts.factory.createPropertyAssignment(
|
||||||
ts.factory.createIdentifier(node.name.text),
|
ts.factory.createIdentifier(node.name.text),
|
||||||
ts.visitNode(node.initializer, visitor) as ts.Expression
|
ts.visitNode(node.initializer, visitor) as ts.Expression
|
||||||
)
|
)
|
||||||
: ts.isStringLiteralLike(node) && node.text === '[undefined]'
|
: ts.isStringLiteralLike(node) && node.text === '[undefined]'
|
||||||
? ts.factory.createIdentifier('undefined')
|
? ts.factory.createIdentifier('undefined')
|
||||||
: ts.visitEachChild(node, visitor, context);
|
: ts.visitEachChild(node, visitor, context);
|
||||||
|
|
||||||
return ts.visitNode(node, visitor);
|
return ts.visitNode(node, visitor);
|
||||||
},
|
},
|
||||||
|
@ -189,7 +190,7 @@ class StrictEqualAssertion {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(private readonly expression: ts.CallExpression) {}
|
constructor(private readonly expression: ts.CallExpression) { }
|
||||||
|
|
||||||
/** Gets the expected value */
|
/** Gets the expected value */
|
||||||
public get expectedValue(): ts.Expression | undefined {
|
public get expectedValue(): ts.Expression | undefined {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*---------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
*--------------------------------------------------------*/
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
export const memoizeLast = <A, T>(fn: (args: A) => T): ((args: A) => T) => {
|
export const memoizeLast = <A, T>(fn: (args: A) => T): ((args: A) => T) => {
|
||||||
let last: { arg: A; result: T } | undefined;
|
let last: { arg: A; result: T } | undefined;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*---------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
*--------------------------------------------------------*/
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
import { TestMessage } from 'vscode';
|
import { TestMessage } from 'vscode';
|
||||||
|
|
||||||
export interface TestMessageMetadata {
|
export interface TestMessageMetadata {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*---------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
*--------------------------------------------------------*/
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*---------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
*--------------------------------------------------------*/
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*---------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
*--------------------------------------------------------*/
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
GREATEST_LOWER_BOUND,
|
GREATEST_LOWER_BOUND,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*---------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
*--------------------------------------------------------*/
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { join, relative } from 'path';
|
import { join, relative } from 'path';
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
|
@ -57,7 +58,7 @@ export class TestFile {
|
||||||
constructor(
|
constructor(
|
||||||
public readonly uri: vscode.Uri,
|
public readonly uri: vscode.Uri,
|
||||||
public readonly workspaceFolder: vscode.WorkspaceFolder
|
public readonly workspaceFolder: vscode.WorkspaceFolder
|
||||||
) {}
|
) { }
|
||||||
|
|
||||||
public getId() {
|
public getId() {
|
||||||
return this.uri.toString().toLowerCase();
|
return this.uri.toString().toLowerCase();
|
||||||
|
@ -168,8 +169,8 @@ export abstract class TestConstruct {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TestSuite extends TestConstruct {}
|
export class TestSuite extends TestConstruct { }
|
||||||
|
|
||||||
export class TestCase extends TestConstruct {}
|
export class TestCase extends TestConstruct { }
|
||||||
|
|
||||||
export type VSCodeTest = TestFile | TestSuite | TestCase;
|
export type VSCodeTest = TestFile | TestSuite | TestCase;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*---------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
* Copyright (C) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
*--------------------------------------------------------*/
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { spawn } from 'child_process';
|
import { spawn } from 'child_process';
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
|
|
Loading…
Reference in a new issue