Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bearfriend committed Jul 13, 2023
1 parent 3b910f4 commit 734d226
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/browser/fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ async function waitForElem(elem, awaitLoadingComplete = true) {
}

export async function fixture(element, opts = {}) {
const pause = window.d2lTestPause;
await Promise.all([reset(opts), document.fonts.ready]);
const elem = await wcFixture(element);
await waitForElem(elem, opts.awaitLoadingComplete);
await pause;
if (pause) {

await window.d2lTestPause;
if (window.d2lTestPause) {
window.d2lTestPause = new Promise(r => window.d2lTestRun = r);
}

return elem;
}

0 comments on commit 734d226

Please sign in to comment.