From ada6d5c76f135836e94fce77a3145dba9636af4d Mon Sep 17 00:00:00 2001 From: Martin Staffa Date: Wed, 10 Jan 2018 15:31:33 +0100 Subject: [PATCH 01/13] test(*): fix tests for Safari 10+ The mocksSpec change is due to the following issue in Safari 10+ strict mode: In the following code, Safari will not use the name of the enclosing function (testCaller) in the stack, but rather list the anonymous function that is called to inject: ``` function testCaller() { return inject(function() { throw new Error(); }); } var throwErrorFromInjectCallback = testCaller(); ``` Naming the anonymous function allows us to check for it in the test. --- test/ng/directive/ngOptionsSpec.js | 4 ++-- test/ngMock/angular-mocksSpec.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ng/directive/ngOptionsSpec.js b/test/ng/directive/ngOptionsSpec.js index 806993b83827..2af26f489367 100644 --- a/test/ng/directive/ngOptionsSpec.js +++ b/test/ng/directive/ngOptionsSpec.js @@ -2922,13 +2922,13 @@ describe('ngOptions', function() { }); - // Support: Safari 9 + // Support: Safari 9+ // This test relies defining a getter/setter `selected` property on either `