mirror of
https://github.com/tenrok/vue-tribute.git
synced 2026-06-16 14:30:35 +03:00
26 lines
656 B
JavaScript
26 lines
656 B
JavaScript
import Vue from "vue";
|
|
import VueTribute from "../src";
|
|
|
|
Vue.use(VueTribute);
|
|
|
|
describe("vue-tribute", () => {
|
|
it("has an install method for Vue.use()", () => {
|
|
expect(typeof VueTribute.install).toEqual("function");
|
|
});
|
|
it("creates the v-tribute directive", () => {
|
|
const vm = new Vue({
|
|
template: "<input type='text' :values='items' v-tribute />",
|
|
data(){
|
|
return {
|
|
items: [
|
|
{key: "Phil Heartman", value: "pheartman"},
|
|
{key: "Gordon Ramsey", value: "gramsey"}
|
|
]
|
|
}
|
|
}
|
|
}).$mount();
|
|
|
|
expect(typeof vm.$options.directives["tribute"]).toEqual("object");
|
|
});
|
|
})
|