mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 16:49:06 +01:00
Extract duplicated code
This commit is contained in:
@@ -7,7 +7,7 @@ import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import * as vscode from 'vscode';
|
||||
import { join } from 'path';
|
||||
import { closeAllEditors } from '../utils';
|
||||
import { closeAllEditors, disposeAll } from '../utils';
|
||||
|
||||
const webviewId = 'myWebview';
|
||||
|
||||
@@ -24,12 +24,7 @@ suite('Webview tests', () => {
|
||||
teardown(async () => {
|
||||
await closeAllEditors();
|
||||
|
||||
while (disposables.length) {
|
||||
let item = disposables.pop();
|
||||
if (item) {
|
||||
item.dispose();
|
||||
}
|
||||
}
|
||||
disposeAll(disposables);
|
||||
});
|
||||
|
||||
test('webviews should be able to send and receive messages', async () => {
|
||||
|
||||
Reference in New Issue
Block a user