From 0fd2688cb41de50d2bebfab46f7b3e8e97c1b28d Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 10 Jun 2020 16:08:29 +0200 Subject: [PATCH] check if clipboard actually works and only iff so write tests... --- .../src/singlefolder-tests/editor.test.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts index eea2a097b05..f83a319aeba 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts @@ -47,9 +47,19 @@ suite('vscode API - editors', () => { }); }); - test('insert snippet with clipboard variables', async () => { + test('insert snippet with clipboard variables', async function () { const old = await env.clipboard.readText(); - await env.clipboard.writeText('INTEGRATION-TESTS'); + + const newValue = 'INTEGRATION-TESTS'; + await env.clipboard.writeText(newValue); + + const actualValue = await env.clipboard.readText(); + + if (actualValue !== newValue) { + // clipboard not working?!? + this.skip(); + return; + } const snippetString = new SnippetString('running: $CLIPBOARD');