Upgrade the test stack to Jest 30 while keeping compatibility with Next 14 and React 18. This includes bumping jest, jest-environment-jsdom, and ts-jest to the latest 30.x versions, updating Jest config as needed (ESM/vm-modules, testEnvironment, transforms), and fixing any resulting test failures.