Skip to content

Commit ac9355e

Browse files
committed
Rename restoreView test and add comment
1 parent 7f20921 commit ac9355e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

extensions/ql-vscode/test/vscode-tests/no-workspace/model-editor/model-editor-view.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ describe("ModelEditorView", () => {
5656
);
5757
});
5858

59-
it("sets up the view", async () => {
59+
it("restores the view", async () => {
60+
// This tests using restoreView because that's much easier to mock than using openView. For openView, we would
61+
// need to mock `vscode.window.createWebviewPanel`, while for restoreView we only need to mock a given WebviewPanel.
62+
//
63+
// The thing we're testing inside this test is whether getPanelConfig returns the correct configuration, so there
64+
// should be no differences between openView/getPanel and restoreView for that.
6065
const panel = mockedObject<WebviewPanel>({
6166
onDidDispose: jest.fn(),
6267
webview: {

0 commit comments

Comments
 (0)