Skip to content

Commit

Permalink
Fix test, code review
Browse files Browse the repository at this point in the history
  • Loading branch information
tjcouch-sil committed Jun 13, 2023
1 parent 2a4e79a commit 1d3f825
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,11 @@ describe('Dock Layout Component', () => {
});

describe('loadTab()', () => {
it('should throw when no id or tabType', () => {
const savedTabInfoNone = {} as SavedTabInfo;

expect(() => loadTab(savedTabInfoNone)).toThrow();
});

it('should throw when no id', () => {
const savedTabInfoNoId = { tabType: 'stuff' } as SavedTabInfo;
const savedTabInfoNoId = {} as SavedTabInfo;

expect(() => loadTab(savedTabInfoNoId)).toThrow();
});

it('should throw when no tabType', () => {
const savedTabInfoNoTabType = { id: 'stuff' } as SavedTabInfo;

expect(() => loadTab(savedTabInfoNoTabType)).toThrow();
});
});

describe('addWebViewToDock()', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/web-view.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export default function WebView({ webViewType, content, title, contentType }: We
}

/**
* Tell the web view service to deserialize the web view with the provided serialized definition
* @param data web view definition to deserialize
* Tell the web view service to load the web view with the provided saved definition
* @param data web view definition to load
*/
async function retrieveWebViewContent(data: SavedWebViewDefinition): Promise<void> {
const loadedId = await getWebView(data.webViewType, undefined, {
Expand Down

0 comments on commit 1d3f825

Please sign in to comment.