Files
habitica/website/client/tests/unit/components/ui/drawer.js
T
Matteo Pagliazzi b44fbdcb14 old client structure
2019-10-01 11:44:38 +02:00

20 lines
555 B
JavaScript

import Vue from 'vue';
import DrawerComponent from 'client/components/ui/drawer.vue';
describe('DrawerComponent', () => {
it('sets the correct default data', () => {
expect(DrawerComponent.data).to.be.a('function');
const defaultData = DrawerComponent.data();
expect(defaultData.open).to.be.true;
});
it('renders the correct title', () => {
const Ctor = Vue.extend(DrawerComponent);
const vm = new Ctor({propsData: {
title: 'My title',
}}).$mount();
expect(vm.$el.textContent).to.be.equal('My title');
});
});