2016-11-10 17:46:23 -05:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
2017-03-02 15:12:46 -05:00
|
|
|
import {describe, expect, it} from '@angular/core/testing/src/testing_internal';
|
2016-11-10 17:46:23 -05:00
|
|
|
import {HammerGestureConfig, HammerGesturesPlugin} from '@angular/platform-browser/src/dom/events/hammer_gestures';
|
|
|
|
|
2017-12-16 17:42:55 -05:00
|
|
|
{
|
2016-11-10 17:46:23 -05:00
|
|
|
describe('HammerGesturesPlugin', () => {
|
2017-12-18 01:18:50 -05:00
|
|
|
if (isNode) return;
|
2016-11-10 17:46:23 -05:00
|
|
|
|
|
|
|
it('should implement addGlobalEventListener', () => {
|
2017-02-14 19:14:40 -05:00
|
|
|
const plugin = new HammerGesturesPlugin(document, new HammerGestureConfig());
|
2016-11-10 17:46:23 -05:00
|
|
|
|
|
|
|
spyOn(plugin, 'addEventListener').and.callFake(() => {});
|
|
|
|
|
|
|
|
expect(() => plugin.addGlobalEventListener('document', 'swipe', () => {})).not.toThrowError();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|