From 01173e4cbdf0cb0fb0839d821fa5bd3cb22e6982 Mon Sep 17 00:00:00 2001 From: Devin Castro Date: Sun, 28 Jul 2013 18:30:21 -0500 Subject: [PATCH] chore(ngMock): Encapsulated ngMock in module wrapper Fixes issue 533 - encapsulate angular-mocks.js into closure (vojtajina) - Leaving mocks out of 'min' grunt task because it doesn't belong in most production implementations of angularjs i.e. testing. --- Gruntfile.js | 3 +-- src/ngMock/angular-mocks.js | 8 +------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 6d0395fbe663..9481043cf674 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -146,8 +146,7 @@ module.exports = function(grunt) { }, mocks: { dest: 'build/angular-mocks.js', - src: ['src/ngMock/angular-mocks.js'], - strict: false + src: util.wrap(['src/ngMock/angular-mocks.js'], 'module') }, sanitize: { dest: 'build/angular-sanitize.js', diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index bfb601fdf62b..51d60aecec6e 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -1,10 +1,4 @@ -/** - * @license AngularJS v"NG_VERSION_FULL" - * (c) 2010-2012 Google, Inc. http://angularjs.org - * License: MIT - * - * TODO(vojta): wrap whole file into closure during build - */ +'use strict'; /** * @ngdoc overview