Created
December 5, 2014 04:09
-
-
Save lawnsea/1da6ab02bd9b0a8f7b3b to your computer and use it in GitHub Desktop.
This is an Intern test suite that demonstrates a bug in Leadfoot's pollUntil helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
'intern!tdd', | |
'intern/dojo/node!leadfoot/helpers/pollUntil', | |
], | |
function (tdd, pollUntil) { | |
tdd.suite('pollUntil', function () { | |
tdd.test('should call the errback if it times out', function () { | |
return this.get('remote') | |
.get('http://google.com') | |
.then(pollUntil(function () { | |
return null; | |
}, 1000)) | |
.then(function (val) { | |
console.log('Super weird.', val); | |
}, function () { | |
console.log('As expected.'); | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment