Skip to content

Commit cfe0125

Browse files
authored
skip test on windows (microsoft#161794)
fix microsoft#161793
1 parent 2b0d08b commit cfe0125

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

src/vs/workbench/contrib/terminal/test/browser/contextualActionAddon.test.ts

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { strictEqual } from 'assert';
7+
import { isWindows } from 'vs/base/common/platform';
78
import { OpenerService } from 'vs/editor/browser/services/openerService';
89
import { ContextMenuService } from 'vs/platform/contextview/browser/contextMenuService';
910
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
@@ -83,10 +84,11 @@ suite('ContextualActionAddon', () => {
8384
});
8485
});
8586
});
86-
suite('freePort', () => {
87-
const expected = new Map();
88-
const portCommand = `yarn start dev`;
89-
const output = `yarn run v1.22.17
87+
if (!isWindows) {
88+
suite('freePort', () => {
89+
const expected = new Map();
90+
const portCommand = `yarn start dev`;
91+
const output = `yarn run v1.22.17
9092
warning ../../package.json: No license field
9193
Error: listen EADDRINUSE: address already in use 0.0.0.0:3000
9294
at Server.setupListenHandle [as _listen2] (node:net:1315:16)
@@ -100,27 +102,29 @@ suite('ContextualActionAddon', () => {
100102
}
101103
error Command failed with exit code 1.
102104
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`;
103-
const actionOptions = [{
104-
id: 'terminal.freePort',
105-
label: 'Free port 3000',
106-
run: true,
107-
tooltip: 'Free port 3000',
108-
enabled: true
109-
}];
110-
setup(() => {
111-
const command = freePort(terminalInstance);
112-
expected.set(command.commandLineMatcher.toString(), [command]);
113-
contextualActionAddon.registerCommandFinishedListener(command);
114-
});
115-
suite('returns undefined when', () => {
116-
test('output does not match', () => {
117-
strictEqual(getMatchActions(createCommand(portCommand, `invalid output`, FreePortOutputRegex), expected), undefined);
105+
const actionOptions = [{
106+
id: 'terminal.freePort',
107+
label: 'Free port 3000',
108+
run: true,
109+
tooltip: 'Free port 3000',
110+
enabled: true
111+
}];
112+
setup(() => {
113+
const command = freePort(terminalInstance);
114+
expected.set(command.commandLineMatcher.toString(), [command]);
115+
contextualActionAddon.registerCommandFinishedListener(command);
116+
});
117+
suite('returns undefined when', () => {
118+
test('output does not match', () => {
119+
strictEqual(getMatchActions(createCommand(portCommand, `invalid output`, FreePortOutputRegex), expected), undefined);
120+
});
121+
});
122+
test('returns actions', () => {
123+
assertMatchOptions(getMatchActions(createCommand(portCommand, output, FreePortOutputRegex), expected), actionOptions);
118124
});
119125
});
120-
test('returns actions', () => {
121-
assertMatchOptions(getMatchActions(createCommand(portCommand, output, FreePortOutputRegex), expected), actionOptions);
122-
});
123-
});
126+
}
127+
124128
suite('gitPushSetUpstream', () => {
125129
const expectedMap = new Map();
126130
const command = `git push`;

0 commit comments

Comments
 (0)