You need to sign in to do that
Don't have an account?

Lightning Web Component Test not working
Lightning Web Component mock data Test is not working with registerLdsTestWireAdapter.
After emiting data is not reflecting on DOM.
After emiting data is not reflecting on DOM.
This is the lightning web component with test
I'm getting below error
TypeError: Cannot read property 'textContent' of null
/ Select elements for validation
const nameEl = document.body.querySelector('p');
expect(nameEl.textContent).toBe(
| ^
mockGetRecord.fields.Name.value);
I have the same problem making the exercises for trailhead chapter Lightning Web Components Tests > Write a Jest Test for Wire Service.
Please, if you find a solution let me know.