We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7745ee2 commit dde7125Copy full SHA for dde7125
test/sum.test.js
@@ -1,5 +1,21 @@
1
-const sum = require('./sum');
+import Vue from 'vue/dist/vue';
2
+import { mount } from '@vue/test-utils';
3
+import { mixin as clickaway } from 'vue-clickaway';
4
-test('adds 1 + 2 to equal 3', () => {
- 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');
18
});
19
+
20
+// NOTES
21
+// - look up rollup
0 commit comments