mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Fixes tests
This commit is contained in:
parent
e3f69de585
commit
bb60a866b2
@ -14,6 +14,10 @@ class Clipboard extends Emitter {
|
||||
constructor(selector) {
|
||||
super();
|
||||
|
||||
if (!document.querySelectorAll(selector).length) {
|
||||
throw new Error('No matches were found for the provided selector');
|
||||
}
|
||||
|
||||
delegate.bind(document.body, selector, 'click', (e) => this.initialize(e));
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ describe('ClipboardAction', () => {
|
||||
describe('#constructor', () => {
|
||||
it('should throw an error since "data-action" is invalid', (done) => {
|
||||
try {
|
||||
new Clipboard({
|
||||
new ClipboardAction({
|
||||
action: 'paste'
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user