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

Commit a094089

Browse files
committed
refactor($location): minor changes (unused deps, exported globals, unused deps, etc)
1 parent 0a1db2a commit a094089

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/ng/location.js

Lines changed: 1 addition & 0 deletions
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

Lines changed: 5 additions & 5 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy