Skip to content

Commit 3f7bc08

Browse files
authored
tests - do not break codeAutomationExit API (refs microsoft/vscode-test-web#82) (microsoft#181682)
1 parent 60fe2d5 commit 3f7bc08

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/vs/platform/log/browser/log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { AdapterLogger, DEFAULT_LOG_LEVEL, ILogger, LogLevel } from 'vs/platform
1111

1212
export interface IAutomatedWindow {
1313
codeAutomationLog(type: string, args: any[]): void;
14-
codeAutomationExit(logs: Array<ILogFile>, code: number): void;
14+
codeAutomationExit(code: number, logs: Array<ILogFile>): void;
1515
}
1616

1717
export interface ILogFile {

src/vs/workbench/services/extensions/browser/extensionService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export class ExtensionService extends AbstractExtensionService implements IExten
146146
// If we are running extension tests, forward logs and exit code
147147
const automatedWindow = window as unknown as IAutomatedWindow;
148148
if (typeof automatedWindow.codeAutomationExit === 'function') {
149-
automatedWindow.codeAutomationExit(await getLogs(this._fileService, this._environmentService), code);
149+
automatedWindow.codeAutomationExit(code, await getLogs(this._fileService, this._environmentService));
150150
}
151151
}
152152
}

test/integration/browser/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async function runTestsInBrowser(browserType: BrowserType, endpoint: url.UrlWith
6767
console[type](...args);
6868
});
6969

70-
await page.exposeFunction('codeAutomationExit', async (logs: Array<{ readonly relativePath: string; readonly contents: string }>, code: number) => {
70+
await page.exposeFunction('codeAutomationExit', async (code: number, logs: Array<{ readonly relativePath: string; readonly contents: string }>) => {
7171
try {
7272
for (const log of logs) {
7373
const absoluteLogsPath = path.join(logsPath, log.relativePath);

0 commit comments

Comments
 (0)