SnowWhiteEPFL / edweiss

0 stars 0 forks source link

Fix Component Detection Error in remotecontrol/index.test.tsx with React Native Testing Library Compatibility #36

Closed TuanDangNguyen2003 closed 2 days ago

TuanDangNguyen2003 commented 2 days ago

When running tests, the following error occurs:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. There seems to be an issue with your configuration that prevents React Native Testing Library from working correctly. Please check if you are using compatible versions of React Native and React Native Testing Library.

This error may indicate an export issue or a compatibility problem between React Native and React Native Testing Library.

Task:

Note: This branch [fix/rmctl-test] was created from [test/tmctl] to address this issue in tests and ensure compatibility.

adamm-alaoui-pro commented 2 days ago

Yeah you are right, maybe checkout the lectureDoc value. It seems to be undefined and only returning the <TActivity ...>, thus making no RouterHeader present in the screen.