Rename restoreView test and add comment

This commit is contained in:
Koen Vlaswinkel
2023-09-15 11:26:25 +02:00
parent 7f20921984
commit ac9355edd1

View File

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