mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
ES6 refactor (#409)
* little fix * little fix /2 * test/clipboard.js refactored * emitter: emitter --> emitter * Examples in ES6 * es6 * back to original code * script > npm test * script > npm test not necessary * updating modules * removing export default
This commit is contained in:

committed by
Zeno Rocha

parent
e1394b3b8c
commit
5ab50475e0
@ -141,7 +141,7 @@ describe('ClipboardAction', () => {
|
||||
});
|
||||
|
||||
let clip = new ClipboardAction({
|
||||
emitter: emitter,
|
||||
emitter,
|
||||
target: document.querySelector('#input')
|
||||
});
|
||||
});
|
||||
@ -156,7 +156,7 @@ describe('ClipboardAction', () => {
|
||||
});
|
||||
|
||||
let clip = new ClipboardAction({
|
||||
emitter: emitter,
|
||||
emitter,
|
||||
target: document.querySelector('#input')
|
||||
});
|
||||
});
|
||||
|
@ -26,7 +26,7 @@ describe('Clipboard', () => {
|
||||
|
||||
describe('#resolveOptions', () => {
|
||||
before(() => {
|
||||
global.fn = function() {};
|
||||
global.fn = () => {};
|
||||
});
|
||||
|
||||
it('should set action as a function', () => {
|
||||
@ -79,8 +79,8 @@ describe('Clipboard', () => {
|
||||
|
||||
it('should throw an exception when target is invalid', done => {
|
||||
try {
|
||||
var clipboard = new Clipboard('.btn', {
|
||||
target: function() {
|
||||
const clipboard = new Clipboard('.btn', {
|
||||
target() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user