From b6a37d112b3e1478f4d14a5f82faabf700443748 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 9 Oct 2013 09:54:10 -0700 Subject: revert: fix($parse): handle promises returned from parsed function calls This reverts commit 3a65822023119b71deab5e298c7ef2de204caa13. The change cased regressions in third party components that require promises from getter functions not to be unwrapped. Since we have deprecated the promise unwrapping support in $parse it doesn't make much sense to fix this issue and deal with regressions in third party code. Closes #4158 --- test/ng/parseSpec.js | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'test/ng/parseSpec.js') diff --git a/test/ng/parseSpec.js b/test/ng/parseSpec.js index 277178a1..940bd6d6 100644 --- a/test/ng/parseSpec.js +++ b/test/ng/parseSpec.js @@ -1129,18 +1129,6 @@ describe('parser', function() { expect(scope.$eval('greeting')).toBe(undefined); }); - it('should evaluate a function call returning a promise and eventually get its return value', function() { - scope.greetingFn = function() { return promise; }; - expect(scope.$eval('greetingFn()')).toBe(undefined); - - scope.$digest(); - expect(scope.$eval('greetingFn()')).toBe(undefined); - - deferred.resolve('hello!'); - expect(scope.$eval('greetingFn()')).toBe(undefined); - scope.$digest(); - expect(scope.$eval('greetingFn()')).toBe('hello!'); - }); describe('assignment into promises', function() { // This behavior is analogous to assignments to non-promise values -- cgit v1.2.3