@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.
- package/.yarnrc +1 -0
- package/CHANGELOG.md +19 -0
- package/README.md +45 -28
- package/fs-provider/dist/extension-web.js +273 -273
- package/fs-provider/dist/fsExtensionMain.js +311 -283
- package/fs-provider/package.json +4 -4
- package/out/index.d.ts +106 -68
- package/out/index.js +365 -233
- package/out/server/app.js +49 -38
- package/out/server/download.js +171 -171
- package/out/server/extensions.js +53 -45
- package/out/server/main.js +15 -15
- package/out/server/mounts.js +78 -78
- package/out/server/workbench.js +112 -147
- package/package.json +3 -3
- package/views/workbench.html +6 -0
package/fs-provider/package.json
CHANGED
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/vscode": "^1.55.0",
|
|
27
|
-
"@types/webpack-env": "^1.16.
|
|
28
|
-
"ts-loader": "^9.2.
|
|
29
|
-
"webpack": "^5.
|
|
30
|
-
"webpack-cli": "^4.
|
|
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
|
|
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
|
|
29
|
-
* - `'stable'` : The latest stable build
|
|
30
|
-
* - `'insiders'` : The latest insiders build
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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>;
|