Try deleting the node_modules, .next and all cache related folders (mostly the ones that are created as soon as you run 'npm run dev'), restart VSCode and run 'npm run test'. Might help :)