I found some errors when trying to run the tests together with the "@" alias configured in the webpack.config.js file
This was the error printed on the console:
FAIL resources/js/Pages/Posts/tests/Index.test.js
● Test suite failed to run
Cannot find module '@/Layouts/AppLayout' from 'resources/js/Pages/Posts/Index.vue'
Require stack:
resources/js/Pages/Posts/Index.vue
resources/js/Pages/Posts/tests/Index.test.js
26 | </template>
27 | <script>
> 28 | import AppLayout from '@/Layouts/AppLayout';
After about 6 hours of research I managed to solve this configuration of Jest that will be in the file just above.
I hope this helps someone!