forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
47 lines (43 loc) · 1.1 KB
/
types.ts
File metadata and controls
47 lines (43 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { Uri } from 'vscode';
import { Tests } from '../types';
export type TestNode = {
id: string;
name: string;
parentid: string;
};
export type TestParent = TestNode & {
kind: 'folder' | 'file' | 'suite' | 'function';
};
export type TestFSNode = TestParent & {
kind: 'folder' | 'file';
relpath: string;
};
export type TestFolder = TestFSNode & {
kind: 'folder';
};
export type TestFile = TestFSNode & {
kind: 'file';
};
export type TestSuite = TestParent & {
kind: 'suite';
};
// function-as-a-container is for parameterized ("sub") tests.
export type TestFunction = TestParent & {
kind: 'function';
};
export type Test = TestNode & {
source: string;
};
export type DiscoveredTests = {
rootid: string;
root: string;
parents: TestParent[];
tests: Test[];
};
export const ITestDiscoveredTestParser = Symbol('ITestDiscoveredTestParser');
export interface ITestDiscoveredTestParser {
parse(resource: Uri, discoveredTests: DiscoveredTests[]): Tests;
}