mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-01-13 08:59:54 +08:00
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.
This commit is contained in:
@@ -1239,7 +1239,7 @@ describe('$location', function() {
|
||||
initBrowser(),
|
||||
initLocation(),
|
||||
function($browser) {
|
||||
browserTrigger(link, 'click', ['ctrl']);
|
||||
browserTrigger(link, 'click', { keys: ['ctrl'] });
|
||||
expectNoRewrite($browser);
|
||||
}
|
||||
);
|
||||
@@ -1252,7 +1252,7 @@ describe('$location', function() {
|
||||
initBrowser(),
|
||||
initLocation(),
|
||||
function($browser) {
|
||||
browserTrigger(link, 'click', ['meta']);
|
||||
browserTrigger(link, 'click', { keys: ['meta'] });
|
||||
expectNoRewrite($browser);
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user