-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dave Woodall
committed
Apr 17, 2018
1 parent
7745ee2
commit 6c3a449
Showing
3 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.