Skip to content

Commit 0b02f05

Browse files
committed
Remove a test assumptions about microtasking order when awaiting a full load().
1 parent fae809b commit 0b02f05

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -579,13 +579,13 @@ suite('include-fragment-element', function () {
579579
div.hidden = false
580580
}, 0)
581581

582-
return load
583-
.then(() => when(div.firstChild, 'include-fragment-replaced'))
584-
.then(() => {
585-
assert.equal(loadCount, 1, 'Load occured too many times')
586-
assert.equal(document.querySelector('include-fragment'), null)
587-
assert.equal(document.querySelector('#replaced').textContent, 'hello')
588-
})
582+
const replacedPromise = when(div.firstChild, 'include-fragment-replaced')
583+
584+
return load.then(replacedPromise).then(() => {
585+
assert.equal(loadCount, 1, 'Load occured too many times')
586+
assert.equal(document.querySelector('include-fragment'), null)
587+
assert.equal(document.querySelector('#replaced').textContent, 'hello')
588+
})
589589
})
590590

591591
test('include-fragment-replaced is only called once', function () {

0 commit comments

Comments
 (0)