Files
habitica/website/client/tests/unit/components/ui/drawer.spec.js
negue bad3f82dfb Inventory: fixes / layout (#11948)
Co-authored-by: Sabe Jones <sabrecat@gmail.com>
2020-10-19 23:54:51 +02:00

22 lines
578 B
JavaScript

import Vue from 'vue';
import DrawerComponent from '@/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.isOpened).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.trim()).to.be.equal('My title');
});
});