From a020d38283f479fb91f4356d76ff1bdbd3b9042f Mon Sep 17 00:00:00 2001 From: Alec Li Date: Sat, 12 Aug 2023 17:39:24 -0700 Subject: [PATCH] Fix jest tests --- .../frontend/src/tests/__mocks__/styleMock.ts | 5 + .../tests/__snapshots__/Modal.test.tsx.snap | 70 +- .../tests/__transformers__/pathTransformer.ts | 16 + .../src/tests/section/StudentDropper.test.tsx | 10 +- .../StudentDropper.test.tsx.snap | 73 +- jest.config.js => jest.config.ts | 21 +- package-lock.json | 34420 +++++++--------- package.json | 7 +- tsconfig.json | 2 +- 9 files changed, 16125 insertions(+), 18499 deletions(-) create mode 100644 csm_web/frontend/src/tests/__mocks__/styleMock.ts create mode 100644 csm_web/frontend/src/tests/__transformers__/pathTransformer.ts rename jest.config.js => jest.config.ts (92%) diff --git a/csm_web/frontend/src/tests/__mocks__/styleMock.ts b/csm_web/frontend/src/tests/__mocks__/styleMock.ts new file mode 100644 index 00000000..a5af8402 --- /dev/null +++ b/csm_web/frontend/src/tests/__mocks__/styleMock.ts @@ -0,0 +1,5 @@ +/** + * Mock with no styles. + */ + +module.exports = {}; diff --git a/csm_web/frontend/src/tests/__snapshots__/Modal.test.tsx.snap b/csm_web/frontend/src/tests/__snapshots__/Modal.test.tsx.snap index af19476c..c6065bf1 100644 --- a/csm_web/frontend/src/tests/__snapshots__/Modal.test.tsx.snap +++ b/csm_web/frontend/src/tests/__snapshots__/Modal.test.tsx.snap @@ -6,23 +6,23 @@ exports[`Modal should close correctly when an external modal closer is clicked 1 class="modal-overlay" />