setupFramework.ts 602 B

123456789101112131415161718192021
  1. /* global process */
  2. import '@visual-snapshot/jest';
  3. // The `@visual-snapshot/jest` package includes these types, but for some reason
  4. // Google Cloud Build's `tsc` fails to include the types (GHA works as expected).
  5. export {};
  6. declare global {
  7. namespace jest {
  8. // eslint complains that R is unused, but we need to match interface,
  9. // eslint-disable-next-line @typescript-eslint/no-unused-vars
  10. interface Matchers<R> {
  11. toSnapshot(): CustomMatcherResult;
  12. }
  13. }
  14. }
  15. process.on('unhandledRejection', reason => {
  16. // eslint-disable-next-line no-console
  17. console.error(reason);
  18. });