Skip to content

Commit

Permalink
tests working after memoizing issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
cijin committed Oct 27, 2020
1 parent 121e4dd commit 2704594
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/tests/dom/waitForDocumentReady.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { waitForDocumentReady } from '../../../src/dom';
import { memoize } from '../../../src/util';

describe('waitForDocumentReady cases', () => {
beforeEach(memoize.clear);
it('should resolve when document is interactive', async () => {
try {
document.readyState = 'interactive';
Expand All @@ -15,12 +16,11 @@ describe('waitForDocumentReady cases', () => {

it('should eventully resolve when document is ready', async () => {
try {
memoize.clear();
document.readyState = 'loading';

setTimeout(() => {
document.readyState = 'complete';
}, 20);
}, 20000);

await waitForDocumentReady();
} catch (err) {
Expand Down

0 comments on commit 2704594

Please sign in to comment.