2
0
mirror of https://github.com/tenrok/vue-tribute.git synced 2026-06-16 14:30:35 +03:00
Files
vue-tribute/test/VueTribute.spec.js
T
2016-07-26 13:38:34 -04:00

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");
});
})