|
|
@ -32,3 +32,24 @@ test.cb('Promise resolves with local document', t => { |
|
|
|
}; |
|
|
|
jsdom.env(config); |
|
|
|
}); |
|
|
|
|
|
|
|
test('callback fires if we wait for DOMContentLoaded', async t => { |
|
|
|
t.plan(1); |
|
|
|
const config = { |
|
|
|
html: '', |
|
|
|
created: (err, window) => domLoaded(() => t.pass(), window.document) |
|
|
|
}; |
|
|
|
jsdom.env(config); |
|
|
|
}); |
|
|
|
|
|
|
|
test.cb('Promise resolves if we wait for DOMContentLoaded', t => { |
|
|
|
t.plan(1); |
|
|
|
const config = { |
|
|
|
html: '', |
|
|
|
created: (err, window) => domLoaded(window.document).then(() => { |
|
|
|
t.pass(); |
|
|
|
t.end(); |
|
|
|
}) |
|
|
|
}; |
|
|
|
jsdom.env(config); |
|
|
|
}); |
|
|
|