need one help from the community below is my code for the JEST testing for one of my component.
import { createElement } from 'c/meetingRooms';
import MeetingRooms from 'c/meetingRooms';
describe('c-meetingRooms', () => {
afterEach( () => {
while (document.body.firstChild) {
document.body.removeChild(document.body.firstChild);
}
})
it('count number of meeting rooms component', () => {
const meetingRooms = createElement('c-meetingRooms', { is: MeetingRooms });
document.body.appendChild(meetingRooms);
const allMeetingRoomsComponent = meetingRooms.shadowRoot.querySelectorAll('c-meeting-room');
expect(allMeetingRoomsComponent.length).toBe(7);
});
});
Error i am getting as below:
-meetingRooms
× count number of meeting rooms component (2ms)
● c-meetingRooms › count number of meeting rooms component
TypeError: (0 , _meetingRooms.createElement) is not a function
it will be great if anyone can help me out. Thanks