Skip to content

Commit dde7125

Browse files
author
Dave Woodall
committed
Add sanity test
1 parent 7745ee2 commit dde7125

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

test/sum.test.js

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1-
const sum = require('./sum');
1+
import Vue from 'vue/dist/vue';
2+
import { mount } from '@vue/test-utils';
3+
import { mixin as clickaway } from 'vue-clickaway';
24

3-
test('adds 1 + 2 to equal 3', () => {
4-
expect(sum(1, 2)).toBe(3);
5+
test('sanity test', () => {
6+
var wrapper = new Vue({
7+
mixins: [clickaway],
8+
template: '<p v-on-clickaway="away">Click away</p>',
9+
data: { foo: true },
10+
methods: {
11+
away() {
12+
console.log('clicked away');
13+
return 'boom';
14+
}
15+
}
16+
}).$mount();
17+
expect(wrapper.away()).toBe('boom');
518
});
19+
20+
// NOTES
21+
// - look up rollup

0 commit comments

Comments
 (0)