Browse Source

Add type test for whenDomReady.resume

transpile
Luke Childs 8 years ago
parent
commit
73e6ee2b21
  1. 10
      test/types.js

10
test/types.js

@ -8,3 +8,13 @@ test('whenDomReady is a function', t => {
test('whenDomReady returns a Promise', t => {
t.true(whenDomReady() instanceof Promise);
});
test('whenDomReady.resume is a function', t => {
t.is(typeof whenDomReady.resume, 'function');
});
test('whenDomReady.resume returns a function that returns a promise', t => {
const returnValue = whenDomReady.resume();
t.is(typeof returnValue, 'function');
t.true(returnValue() instanceof Promise);
});

Loading…
Cancel
Save