Created
December 5, 2014 04:09
Revisions
-
lawnsea created this gist
Dec 5, 2014 .There are no files selected for viewing
This file contains 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ 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.'); }); }); }); });