From f5a218d5a77c0f5eff8cd7f7fb0eea16256e1183 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 8 Jun 2020 12:06:53 +0200 Subject: [PATCH] restore clipboard text after test, https://github.com/microsoft/vscode/issues/98497 --- .../vscode-api-tests/src/singlefolder-tests/editor.test.ts | 6 ++++-- 1 file changed, 4 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 f9a94ea4d7c..eea2a097b05 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/editor.test.ts @@ -48,17 +48,19 @@ suite('vscode API - editors', () => { }); test('insert snippet with clipboard variables', async () => { - + const old = await env.clipboard.readText(); await env.clipboard.writeText('INTEGRATION-TESTS'); const snippetString = new SnippetString('running: $CLIPBOARD'); - return withRandomFileEditor('', async (editor, doc) => { + await withRandomFileEditor('', async (editor, doc) => { const inserted = await editor.insertSnippet(snippetString); assert.ok(inserted); assert.equal(doc.getText(), 'running: INTEGRATION-TESTS'); assert.ok(doc.isDirty); }); + + await env.clipboard.writeText(old); }); test('insert snippet with replacement, editor selection', () => {