innerText is undefined in jest test

If you are using the default testEnvironment, then you are using jsdom.

You can check this issue to see why it is not implemented in jsdom :
https://github.com/tmpvar/jsdom/issues/1245

The primary issue is the fact that innerText leans on the layout engine for guidance, and jsdom has no layout engine

If you want “full” browser support you can check puppeteer

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)