Browse Source

Test DOMContentLoaded event

transpile
Luke Childs 8 years ago
parent
commit
013d020bef
  1. 21
      test/unit.js

21
test/unit.js

@ -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);
});

Loading…
Cancel
Save