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

Commit 7f524c4

Browse files
committed
refactor($location): minor changes (unused deps, exported globals, unused deps, etc)
1 parent a42f8a0 commit 7f524c4

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/ng/location.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
/* global stripHash: true */
23

34
var PATH_MATCH = /^([^?#]*)(\?([^#]*))?(#(.*))?$/,
45
DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};

test/ng/locationSpec.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -693,10 +693,10 @@ describe('$location', function() {
693693

694694
describe('location watch', function() {
695695

696-
it('should not update browser if only the empty hash fragment is cleared by updating the search', function() {
696+
it('should not update browser if only the empty hash fragment is cleared', function() {
697697
initService({supportHistory: true});
698-
mockUpBrowser({initialUrl:'http://new.com/a/b#', baseHref:'/base/'});
699-
inject(function($rootScope, $browser, $location) {
698+
mockUpBrowser({initialUrl: 'http://new.com/a/b#', baseHref: '/base/'});
699+
inject(function($browser, $rootScope) {
700700
$browser.url('http://new.com/a/b');
701701
var $browserUrl = spyOnlyCallsWithArgs($browser, 'url').and.callThrough();
702702
$rootScope.$digest();
@@ -707,8 +707,8 @@ describe('$location', function() {
707707

708708
it('should not replace browser url if only the empty hash fragment is cleared', function() {
709709
initService({html5Mode: true, supportHistory: true});
710-
mockUpBrowser({initialUrl:'http://new.com/#', baseHref: '/'});
711-
inject(function($browser, $location) {
710+
mockUpBrowser({initialUrl: 'http://new.com/#', baseHref: '/'});
711+
inject(function($browser, $location, $window) {
712712
expect($browser.url()).toBe('http://new.com/#');
713713
expect($location.absUrl()).toBe('http://new.com/');
714714
});

0 commit comments

Comments
 (0)