From 2c9cc920385d330391a891ba061f910e0c979550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Fri, 18 Feb 2022 03:05:17 +0100 Subject: [PATCH] fix: mock --- examples/with-jest-babel/__mocks__/fileMock.js | 7 ++++++- packages/next/build/jest/__mocks__/fileMock.js | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/examples/with-jest-babel/__mocks__/fileMock.js b/examples/with-jest-babel/__mocks__/fileMock.js index cf6617db8672..4a271a81f5da 100644 --- a/examples/with-jest-babel/__mocks__/fileMock.js +++ b/examples/with-jest-babel/__mocks__/fileMock.js @@ -1,3 +1,8 @@ // Read more at "Handling stylesheets and image imports" on https://nextjs.org/docs/testing -module.exports = { src: '/img.jpg', height: 24, width: 24 } +module.exports = { + src: '/img.jpg', + height: 24, + width: 24, + blurDataURL: 'data:image/png;base64,imagedata', +} diff --git a/packages/next/build/jest/__mocks__/fileMock.js b/packages/next/build/jest/__mocks__/fileMock.js index c211176b84a2..8761cdaa4652 100644 --- a/packages/next/build/jest/__mocks__/fileMock.js +++ b/packages/next/build/jest/__mocks__/fileMock.js @@ -1 +1,6 @@ -module.exports = { src: '/img.jpg', height: 24, width: 24 } +module.exports = { + src: '/img.jpg', + height: 24, + width: 24, + blurDataURL: 'data:image/png;base64,imagedata', +}