Skip to content

Commit f5a218d

Browse files
committed
restore clipboard text after test, microsoft#98497
1 parent 48a2d3e commit f5a218d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

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

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

5050
test('insert snippet with clipboard variables', async () => {
51-
51+
const old = await env.clipboard.readText();
5252
await env.clipboard.writeText('INTEGRATION-TESTS');
5353

5454
const snippetString = new SnippetString('running: $CLIPBOARD');
5555

56-
return withRandomFileEditor('', async (editor, doc) => {
56+
await withRandomFileEditor('', async (editor, doc) => {
5757
const inserted = await editor.insertSnippet(snippetString);
5858
assert.ok(inserted);
5959
assert.equal(doc.getText(), 'running: INTEGRATION-TESTS');
6060
assert.ok(doc.isDirty);
6161
});
62+
63+
await env.clipboard.writeText(old);
6264
});
6365

6466
test('insert snippet with replacement, editor selection', () => {

0 commit comments

Comments
 (0)