diff --git a/test/jasmine/tests/animate_test.js b/test/jasmine/tests/animate_test.js index f32da2df108..1e7e01d199a 100644 --- a/test/jasmine/tests/animate_test.js +++ b/test/jasmine/tests/animate_test.js @@ -747,11 +747,9 @@ describe('Animate expandObjectPaths do not pollute prototype', function() { data: [{y: [2, 3, 1], '__proto__.polluted': true}], traces: [0] }); - }).then(function() { - setTimeout(function() { - var a = {}; - expect(a.polluted).toBeUndefined(); - }, 100); + }).then(delay(100)).then(function() { + var a = {}; + expect(a.polluted).toBeUndefined(); }).then(done, done.fail); }); });