Skip to content

Commit 0fd2688

Browse files
committed
check if clipboard actually works and only iff so write tests...
1 parent be0a7e2 commit 0fd2688

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,19 @@ suite('vscode API - editors', () => {
4747
});
4848
});
4949

50-
test('insert snippet with clipboard variables', async () => {
50+
test('insert snippet with clipboard variables', async function () {
5151
const old = await env.clipboard.readText();
52-
await env.clipboard.writeText('INTEGRATION-TESTS');
52+
53+
const newValue = 'INTEGRATION-TESTS';
54+
await env.clipboard.writeText(newValue);
55+
56+
const actualValue = await env.clipboard.readText();
57+
58+
if (actualValue !== newValue) {
59+
// clipboard not working?!?
60+
this.skip();
61+
return;
62+
}
5363

5464
const snippetString = new SnippetString('running: $CLIPBOARD');
5565

0 commit comments

Comments
 (0)