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:
Gabriel Kalani
2017-05-03 01:34:18 -03:00
committed by Zeno Rocha
parent e1394b3b8c
commit 5ab50475e0
5 changed files with 27 additions and 27 deletions

View File

@ -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')
});
});

View File

@ -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;
}
});