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 dde7125
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions test/sum.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
const sum = require('./sum');
import Vue from 'vue/dist/vue';
import { mount } from '@vue/test-utils';
import { mixin as clickaway } from 'vue-clickaway';

test('adds 1 + 2 to equal 3', () => {
expect(sum(1, 2)).toBe(3);
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

0 comments on commit dde7125

Please sign in to comment.