Simplify test using whenPromise.delay()

This commit is contained in:
josieusa 2017-01-11 15:31:05 +01:00
parent 7deb0a7fa1
commit 47daf074f8
1 changed files with 1 additions and 3 deletions

View File

@ -162,9 +162,7 @@ describe('LoopBack Context', function() {
var ctx = LoopBackContext.getCurrentContext(options);
expect(ctx).is.an('object');
ctx.set('test-key', pushedValue);
var whenPromise = whenV377.promise(function(resolve) {
setTimeout(resolve, timeout);
});
var whenPromise = whenV377().delay(timeout);
whenPromise.then(function pullFromContextAndReturn() {
var pulledValue = ctx && ctx.get('test-key');
outerResolve({