Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 96bbf72

Browse files
committedAug 14, 2013
test(docs): don't mock out window unnecessarily
1 parent 7215afa commit 96bbf72

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed
 

Diff for: ‎docs/component-spec/annotationsSpec.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@ describe('Docs Annotations', function() {
6565

6666
describe('foldout directive', function() {
6767

68-
var $scope, parent, element, url, window;
68+
var $scope, parent, element, url;
6969
beforeEach(function() {
7070
module(function($provide, $animateProvider) {
71-
$provide.value('$window', window = createMockWindow());
7271
$animateProvider.register('.foldout', function($timeout) {
7372
return {
7473
enter : function(element, done) {
@@ -158,17 +157,13 @@ describe('Docs Annotations', function() {
158157

159158
describe('DocsController fold', function() {
160159

161-
var window, $scope, ctrl;
160+
var $scope, ctrl;
162161
beforeEach(function() {
163-
module(function($provide, $animateProvider) {
164-
$provide.value('$window', window = createMockWindow());
165-
});
166162
inject(function($rootScope, $controller, $location, $cookies, sections) {
167163
$scope = $rootScope.$new();
168164
ctrl = $controller('DocsController',{
169165
$scope : $scope,
170166
$location : $location,
171-
$window : window,
172167
$cookies : $cookies,
173168
sections : sections
174169
});

Diff for: ‎docs/component-spec/versionJumpSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe('DocsApp', function() {
8484

8585
$scope.jumpToDocsVersion('2.1.3');
8686
expect(window.location).toBe('http://code.angularjs.org/2.1.3/docs');
87-
});
87+
});
8888

8989
it('should jump to the older versions of current docs for version >= 1.0.2', function() {
9090
$scope.jumpToDocsVersion('1.0.1');

0 commit comments

Comments
 (0)
This repository has been archived.