@vscode/test-web 0.0.17 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/index.d.ts CHANGED
@@ -1,106 +1,114 @@
1
- #!/usr/bin/env node
2
- export declare type BrowserType = 'chromium' | 'firefox' | 'webkit';
3
- export declare type VSCodeQuality = 'insiders' | 'stable';
4
- export interface Options {
5
- /**
6
- * Browser to run the test against: 'chromium' | 'firefox' | 'webkit'
7
- */
8
- browserType: BrowserType;
9
- /**
10
- * Absolute path to folder that contains one or more extensions (in subfolders).
11
- * Extension folders include a `package.json` extension manifest.
12
- */
13
- extensionDevelopmentPath?: string;
14
- /**
15
- * Absolute path to the extension tests runner module.
16
- * Can be either a file path or a directory path that contains an `index.js`.
17
- * The module is expected to have a `run` function of the following signature:
18
- *
19
- * ```ts
20
- * function run(): Promise<void>;
21
- * ```
22
- *
23
- * When running the extension test, the Extension Development Host will call this function
24
- * that runs the test suite. This function should throws an error if any test fails.
25
- */
26
- extensionTestsPath?: string;
27
- /**
28
- * The quality of the VS Code to use. Supported qualities are:
29
- * - `'stable'` : The latest stable build will be used
30
- * - `'insiders'` : The latest insiders build will be used
31
- *
32
- * Currently defaults to `insiders`, which is latest stable insiders.
33
- *
34
- * The setting is ignored when a vsCodeDevPath is provided.
35
- */
36
- quality?: VSCodeQuality;
37
- /**
38
- * @deprecated. Use `quality` or `vsCodeDevPath` instead.
39
- */
40
- version?: string;
41
- /**
42
- * Open the dev tools.
43
- */
44
- devTools?: boolean;
45
- /**
46
- * Do not show the browser. Defaults to `true` if a `extensionTestsPath` is provided, `false` otherwise.
47
- */
48
- headless?: boolean;
49
- /**
50
- * Do not show the server log. Defaults to `true` if a extensionTestsPath is provided, `false` otherwise.
51
- */
52
- hideServerLog?: boolean;
53
- /**
54
- * Expose browser debugging on this port number, and wait for the debugger to attach before running tests.
55
- */
56
- waitForDebugger?: number;
57
- /**
58
- * A local path to open VSCode on. VS Code for the browser will open an a virtual
59
- * file system ('vscode-test-web://mount') where the files of the local folder will served.
60
- * The file system is read/write, but modifications are stored in memory and not written back to disk.
61
- */
62
- folderPath?: string;
63
- /**
64
- * The folder URI to open VSCode on. If 'folderPath' is set this will be ignored and 'vscode-test-web://mount'
65
- * is used as folder URI instead.
66
- */
67
- folderUri?: string;
68
- /**
69
- * Permissions granted to the opened browser. An list of permissions can be found at
70
- * https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions
71
- * Example: [ 'clipboard-read', 'clipboard-write' ]
72
- */
73
- permissions?: string[];
74
- /**
75
- * Absolute paths pointing to built-in extensions to include.
76
- */
77
- extensionPaths?: string[];
78
- /**
79
- * Absolute path pointing to VS Code sources to use.
80
- */
81
- vsCodeDevPath?: string;
82
- /**
83
- * Print out more information while the server is running, e.g. the console output in the browser
84
- */
85
- verbose?: boolean;
86
- /**
87
- * The port to start the server on. Defaults to `3000`.
88
- */
89
- port?: number;
90
- /**
91
- * The host name to start the server on. Defaults to `localhost`
92
- */
93
- host?: string;
94
- }
95
- export interface Disposable {
96
- dispose(): void;
97
- }
98
- /**
99
- * Runs the tests in a browser.
100
- *
101
- * @param options The options defining browser type, extension and test location.
102
- */
103
- export declare function runTests(options: Options & {
104
- extensionTestsPath: string;
105
- }): Promise<void>;
106
- export declare function open(options: Options): Promise<Disposable>;
1
+ #!/usr/bin/env node
2
+ export declare type BrowserType = 'chromium' | 'firefox' | 'webkit' | 'none';
3
+ export declare type VSCodeQuality = 'insiders' | 'stable';
4
+ export declare type GalleryExtension = {
5
+ readonly id: string;
6
+ readonly preRelease?: boolean;
7
+ };
8
+ export interface Options {
9
+ /**
10
+ * Browser to open: 'chromium' | 'firefox' | 'webkit' | 'none'.
11
+ */
12
+ browserType: BrowserType;
13
+ /**
14
+ * Absolute path to folder that contains one or more extensions (in subfolders).
15
+ * Extension folders include a `package.json` extension manifest.
16
+ */
17
+ extensionDevelopmentPath?: string;
18
+ /**
19
+ * Absolute path to the extension tests runner module.
20
+ * Can be either a file path or a directory path that contains an `index.js`.
21
+ * The module is expected to have a `run` function of the following signature:
22
+ *
23
+ * ```ts
24
+ * function run(): Promise<void>;
25
+ * ```
26
+ *
27
+ * When running the extension test, the Extension Development Host will call this function
28
+ * that runs the test suite. This function should throws an error if any test fails.
29
+ */
30
+ extensionTestsPath?: string;
31
+ /**
32
+ * The quality of the VS Code to use. Supported qualities are:
33
+ * - `'stable'` : The latest stable build will be used
34
+ * - `'insiders'` : The latest insiders build will be used
35
+ *
36
+ * Currently defaults to `insiders`, which is latest stable insiders.
37
+ *
38
+ * The setting is ignored when a vsCodeDevPath is provided.
39
+ */
40
+ quality?: VSCodeQuality;
41
+ /**
42
+ * @deprecated. Use `quality` or `vsCodeDevPath` instead.
43
+ */
44
+ version?: string;
45
+ /**
46
+ * Open the dev tools.
47
+ */
48
+ devTools?: boolean;
49
+ /**
50
+ * Do not show the browser. Defaults to `true` if a `extensionTestsPath` is provided, `false` otherwise.
51
+ */
52
+ headless?: boolean;
53
+ /**
54
+ * Do not show the server log. Defaults to `true` if a extensionTestsPath is provided, `false` otherwise.
55
+ */
56
+ hideServerLog?: boolean;
57
+ /**
58
+ * Expose browser debugging on this port number, and wait for the debugger to attach before running tests.
59
+ */
60
+ waitForDebugger?: number;
61
+ /**
62
+ * A local path to open VSCode on. VS Code for the browser will open an a virtual
63
+ * file system ('vscode-test-web://mount') where the files of the local folder will served.
64
+ * The file system is read/write, but modifications are stored in memory and not written back to disk.
65
+ */
66
+ folderPath?: string;
67
+ /**
68
+ * The folder URI to open VSCode on. If 'folderPath' is set this will be ignored and 'vscode-test-web://mount'
69
+ * is used as folder URI instead.
70
+ */
71
+ folderUri?: string;
72
+ /**
73
+ * Permissions granted to the opened browser. An list of permissions can be found at
74
+ * https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions
75
+ * Example: [ 'clipboard-read', 'clipboard-write' ]
76
+ */
77
+ permissions?: string[];
78
+ /**
79
+ * Absolute paths pointing to built-in extensions to include.
80
+ */
81
+ extensionPaths?: string[];
82
+ /**
83
+ * List of extensions to include. The id format is ${publisher}.${name}.
84
+ */
85
+ extensionIds?: GalleryExtension[];
86
+ /**
87
+ * Absolute path pointing to VS Code sources to use.
88
+ */
89
+ vsCodeDevPath?: string;
90
+ /**
91
+ * Print out more information while the server is running, e.g. the console output in the browser
92
+ */
93
+ verbose?: boolean;
94
+ /**
95
+ * The port to start the server on. Defaults to `3000`.
96
+ */
97
+ port?: number;
98
+ /**
99
+ * The host name to start the server on. Defaults to `localhost`
100
+ */
101
+ host?: string;
102
+ }
103
+ export interface Disposable {
104
+ dispose(): void;
105
+ }
106
+ /**
107
+ * Runs the tests in a browser.
108
+ *
109
+ * @param options The options defining browser type, extension and test location.
110
+ */
111
+ export declare function runTests(options: Options & {
112
+ extensionTestsPath: string;
113
+ }): Promise<void>;
114
+ export declare function open(options: Options): Promise<Disposable>;