From e4d43fb6f7c82643ff5a1671fe8d3d6d1f9ad634 Mon Sep 17 00:00:00 2001 From: Alex Ball Date: Fri, 20 Aug 2021 19:48:11 -0400 Subject: [PATCH] Fix error about logging after tests. See this issue: https://github.com/vercel/next.js/issues/20048#issuecomment-869190879 --- frontend/__mocks__/next/link.js | 3 +++ frontend/setupTests.js | 1 - frontend/tests/snapshots/__snapshots__/login.test.tsx.snap | 2 -- frontend/tests/snapshots/__snapshots__/passport.test.tsx.snap | 2 -- frontend/tests/snapshots/__snapshots__/register.test.tsx.snap | 2 -- 5 files changed, 3 insertions(+), 7 deletions(-) create mode 100644 frontend/__mocks__/next/link.js delete mode 100644 frontend/setupTests.js diff --git a/frontend/__mocks__/next/link.js b/frontend/__mocks__/next/link.js new file mode 100644 index 00000000..31339494 --- /dev/null +++ b/frontend/__mocks__/next/link.js @@ -0,0 +1,3 @@ +const mockLink = ({ children, href }) => + +export default mockLink diff --git a/frontend/setupTests.js b/frontend/setupTests.js deleted file mode 100644 index fd3b1f80..00000000 --- a/frontend/setupTests.js +++ /dev/null @@ -1 +0,0 @@ -import "@testing-library/jest-dom/extend-expect" diff --git a/frontend/tests/snapshots/__snapshots__/login.test.tsx.snap b/frontend/tests/snapshots/__snapshots__/login.test.tsx.snap index ea41259d..1c95d771 100644 --- a/frontend/tests/snapshots/__snapshots__/login.test.tsx.snap +++ b/frontend/tests/snapshots/__snapshots__/login.test.tsx.snap @@ -77,8 +77,6 @@ exports[`renders Login correctly 1`] = ` Register for an account diff --git a/frontend/tests/snapshots/__snapshots__/passport.test.tsx.snap b/frontend/tests/snapshots/__snapshots__/passport.test.tsx.snap index d2ebcc54..efe503d5 100644 --- a/frontend/tests/snapshots/__snapshots__/passport.test.tsx.snap +++ b/frontend/tests/snapshots/__snapshots__/passport.test.tsx.snap @@ -435,8 +435,6 @@ exports[`renders correctly 1`] = ` Return to dashboard diff --git a/frontend/tests/snapshots/__snapshots__/register.test.tsx.snap b/frontend/tests/snapshots/__snapshots__/register.test.tsx.snap index 1a678a97..11c22bf3 100644 --- a/frontend/tests/snapshots/__snapshots__/register.test.tsx.snap +++ b/frontend/tests/snapshots/__snapshots__/register.test.tsx.snap @@ -245,8 +245,6 @@ exports[`renders Register correctly 1`] = ` Login instead