turborepo
44df9144 - next/font: Align with Next.js integration test suite (#4039)

Commit
2 years ago
next/font: Align with Next.js integration test suite (#4039) This: * Adds a compile-time feature, `__internal_nextjs_integration_test`, which is set when building Turbopack for the Next.js integration test suite. * When built with `__internal_nextjs_integration_test`, expects the environment variable `NEXT_FONT_GOOGLE_MOCKED_RESPONSES` to be set with an absolute path to a JavaScript file exporting a mapping of urls to stylesheet text. This is used in place of making real requests to Google Fonts. * Addresses some small bugs in next/font/google to bring the implementation in line with the urls generated by Next.js without Turbopack. * Changes classnames generated by next/font to use 6 character hashes, bringing it in alignment with Next.js without Turbopack. Test Plan: * Adjusted existing unit tests * In Next.js, `node run-tests.js -c 1 test/e2e/next-font/index.test.ts` ### Description <!-- ✍️ Write a short summary of your work. If necessary, include relevant screenshots. --> ### Testing Instructions <!-- Give a quick description of steps to test your changes. --> <!-- When the below is checked (default) our PR bot will automatically assign labels to your PR based on the content to help the team organize and review it faster. --> - [x] Auto label
Author
Parents
Loading