test('it works', function(assert) { const result = getTravisStatus(); assert.ok(!!result.then, 'The helper should return a promise'); });
andThen(function() { const repo = 'sir-dunxalot/some-fake-repo'; getTravisStatus(repo).then(function(buildStatus) { status = buildStatus; }); Ember.Test.registerWaiter(function() { return !!status; }); });
andThen(function() { /* Pretend the value has been previously retrieved using some unusual value */ TravisCache.set(repo, fakeCachedValue); getTravisStatus(repo).then(function(buildStatus) { status = buildStatus; }); Ember.Test.registerWaiter(function() { return !!status; }); });