Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yesil committed Jun 3, 2024
1 parent 9d18c9a commit 56b3a43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions test/blocks/merch-twp/merch-twp.2cards.test.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
describe('Merch TWP', async () => {
before(async () => {
mockIms();
mockFetch();
await mockFetch();
await initService(true);
});

after(async () => {
unmockIms();
unmockFetch();
await unmockFetch();
});
it('renders merch-twp with 3 tabs and 4 cards', async () => {
const main = document.querySelector('main');
Expand All @@ -59,7 +59,8 @@
const clone = document.importNode(template.content, true);
main.append(clone);
const twp = await merchTwp(document.querySelector('.merch-twp'));
return await getModal(null, { id: 'twp-modal', content: twp, class: 'twp' });
await getModal(null, { id: 'twp-modal', content: twp, class: 'twp' });
expect(document.querySelector('merch-twp-d2p').shadowRoot).to.exist;
});
});

Expand Down
6 changes: 3 additions & 3 deletions test/blocks/merch-twp/merch-twp.3cards.test.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
describe('Merch TWP', async () => {
before(async () => {
mockIms();
mockFetch();
await mockFetch();
await initService(true);
});

after(async () => {
unmockIms();
unmockFetch();
await unmockFetch();
});
it('renders merch-twp with 3 tabs and 4 cards', async () => {
const main = document.querySelector('main');
Expand All @@ -60,7 +60,7 @@
main.append(clone);
const twp = await merchTwp(document.querySelector('.merch-twp'));
await getModal(null, { id: 'twp-modal', content: twp, class: 'twp' });
expect(twp).to.exist;
expect(document.querySelector('merch-twp-d2p').shadowRoot).to.exist;
});
});

Expand Down

0 comments on commit 56b3a43

Please sign in to comment.