Skip to content

Commit

Permalink
test: Update link in Menu component test + remove unnecessary TS ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmilton committed Sep 27, 2023
1 parent a4667ba commit 4243805
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/unit/Menu.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test('rendered DOM contains expected elements', () => {
expect(rendered.container.querySelector('a[href="chrome://bookmarks"]')).toBeTruthy();
expect(rendered.container.querySelector('a[href="chrome://downloads"]')).toBeTruthy();
expect(rendered.container.querySelector('a[href="chrome://history"]')).toBeTruthy();
expect(rendered.container.querySelector('a[href="chrome://settings/passwords"]')).toBeTruthy();
expect(rendered.container.querySelector('a[href="chrome://password-manager"]')).toBeTruthy();
expect(
rendered.container.querySelector('a[href="https://github.com/maxmilton/new-tab/issues"]'),
).toBeTruthy();
Expand Down
8 changes: 2 additions & 6 deletions test/unit/test-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ describe('render', () => {
});

test('debug function prints to console', async () => {
const spy = spyOn(console, 'log')
// @ts-expect-error - noop mock
.mockImplementation(() => {});
const spy = spyOn(console, 'log').mockImplementation(() => {});
const rendered = render(document.createElement('div'));
await rendered.debug();
expect(spy).toHaveBeenCalledTimes(1);
Expand All @@ -69,9 +67,7 @@ describe('render', () => {
});

test('debug function prints prettified container DOM to console', async () => {
const spy = spyOn(console, 'log')
// @ts-expect-error - noop mock
.mockImplementation(() => {});
const spy = spyOn(console, 'log').mockImplementation(() => {});
const main = document.createElement('main');
main.append(
document.createElement('div'),
Expand Down

0 comments on commit 4243805

Please sign in to comment.