@vscode/test-web 0.0.13 → 0.0.17

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.
@@ -24,10 +24,10 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/vscode": "^1.55.0",
27
- "@types/webpack-env": "^1.16.0",
28
- "ts-loader": "^9.2.3",
29
- "webpack": "^5.40.0",
30
- "webpack-cli": "^4.7.2",
27
+ "@types/webpack-env": "^1.16.2",
28
+ "ts-loader": "^9.2.6",
29
+ "webpack": "^5.55.0",
30
+ "webpack-cli": "^4.8.0",
31
31
  "process": "^0.11.10",
32
32
  "path-browserify": "^1.0.1",
33
33
  "request-light": "^0.5.3",
package/out/index.d.ts CHANGED
@@ -1,68 +1,106 @@
1
- #!/usr/bin/env node
2
- export declare type BrowserType = 'chromium' | 'firefox' | 'webkit';
3
- export declare type VSCodeVersion = 'insiders' | 'stable' | 'sources';
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 VS Code version to use. Valid versions are:
29
- * - `'stable'` : The latest stable build
30
- * - `'insiders'` : The latest insiders build
31
- * - `'sources'`: From sources, served at localhost:8080 by running `yarn web` in the vscode repo
32
- *
33
- * Currently defaults to `insiders`, which is latest stable insiders.
34
- */
35
- version?: VSCodeVersion;
36
- /**
37
- * Open the dev tools.
38
- */
39
- devTools?: boolean;
40
- /**
41
- * Do not show the browser. Defaults to `true` if a extensionTestsPath is provided, `false` otherwise.
42
- */
43
- headless?: boolean;
44
- /**
45
- * Expose browser debugging on this port number, and wait for the debugger to attach before running tests.
46
- */
47
- waitForDebugger?: number;
48
- /**
49
- * A local path to open VSCode on. VS Code for the browser will open an a virtual
50
- * file system ('vscode-test-web://mount') where the files of the local folder will served.
51
- * The file system is read/write, but modifications are stored in memory and not written back to disk.
52
- */
53
- folderPath?: string;
54
- /**
55
- * The folder URI to open VSCode on. If 'folderPath' is set this will be ignored and 'vscode-test-web://mount'
56
- * is used as folder URI instead.
57
- */
58
- folderUri?: string;
59
- }
60
- /**
61
- * Runs the tests in a browser.
62
- *
63
- * @param options The options defining browser type, extension and test location.
64
- */
65
- export declare function runTests(options: Options & {
66
- extensionTestsPath: string;
67
- }): Promise<void>;
68
- export declare function open(options: Options): Promise<void>;
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>;