Skip to content

Commit

Permalink
Add sanity test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Woodall committed Apr 17, 2018
1 parent 7745ee2 commit 6c3a449
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
21 changes: 21 additions & 0 deletions index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import Vue from 'vue/dist/vue';
import { mount } from '@vue/test-utils';
import { mixin as clickaway } from 'vue-clickaway';

test('sanity test', () => {
var wrapper = new Vue({
mixins: [clickaway],
template: '<p v-on-clickaway="away">Click away</p>',
data: { foo: true },
methods: {
away() {
console.log('clicked away');
return 'boom';
}
}
}).$mount();
expect(wrapper.away()).toBe('boom');
});

// NOTES
// - look up rollup
4 changes: 0 additions & 4 deletions test/sum.js

This file was deleted.

5 changes: 0 additions & 5 deletions test/sum.test.js

This file was deleted.

0 comments on commit 6c3a449

Please sign in to comment.