Simplify test using whenPromise.delay()
This commit is contained in:
parent
7deb0a7fa1
commit
47daf074f8
|
@ -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({
|
||||
|
|
Loading…
Reference in New Issue