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

Commit 5847fc4

Browse files
petebacondarwintbosch
authored andcommitted
test($location): fix use of browserTrigger
You must now pass `keys` to the function in a config object. This bug in the test became apparent because in newer browsers, arrays have a function called `keys()` and this was causing browserTrigger to fail. Previously it was quietly passing this test despite being wrong.
1 parent 1ee9b4e commit 5847fc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/ng/locationSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ describe('$location', function() {
12301230
initBrowser(),
12311231
initLocation(),
12321232
function($browser) {
1233-
browserTrigger(link, 'click', ['ctrl']);
1233+
browserTrigger(link, 'click', { keys: ['ctrl'] });
12341234
expectNoRewrite($browser);
12351235
}
12361236
);
@@ -1243,7 +1243,7 @@ describe('$location', function() {
12431243
initBrowser(),
12441244
initLocation(),
12451245
function($browser) {
1246-
browserTrigger(link, 'click', ['meta']);
1246+
browserTrigger(link, 'click', { keys: ['meta'] });
12471247
expectNoRewrite($browser);
12481248
}
12491249
);

0 commit comments

Comments
 (0)