wavelovers/tests/unit/MessageItem.spec.ts

18 lines
395 B
TypeScript
Raw Permalink Normal View History

2022-12-18 12:10:37 +03:00
import { shallowMount } from '@vue/test-utils';
import MessageItem from '@/components/MessageItem.vue';
describe('MessageItem.vue', () => {
it('renders slots when passed', () => {
const msg = 'new message';
2022-12-18 12:44:24 +03:00
const wrapper = shallowMount(
MessageItem,
{
slots: {
default: msg,
},
}
);
2022-12-18 12:10:37 +03:00
expect(wrapper.html()).toContain(msg);
});
});