From daab34821bb20b8c585762453902212cf9b23fe4 Mon Sep 17 00:00:00 2001 From: Brian Huynh Date: Fri, 11 Oct 2024 01:14:28 -0700 Subject: [PATCH 1/2] Added jest tests for JsonGenerator --- jest.config.js | 4 ++++ src/app/customizer/JsonGenerator/components/Item.jsx | 2 ++ 2 files changed, 6 insertions(+) diff --git a/jest.config.js b/jest.config.js index 81a68eef..43bde27b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -11,6 +11,10 @@ const config = { setupFilesAfterEnv: ["/jest.setup.js"], testEnvironment: "jest-environment-jsdom", + moduleNameMapper: { + "^@/(.*)$": "/src/$1", // Maps '@/' to the 'src' folder + }, + // coverage init settings // collectCoverage: true, // coverageDirectory: "coverage", diff --git a/src/app/customizer/JsonGenerator/components/Item.jsx b/src/app/customizer/JsonGenerator/components/Item.jsx index 8911d12f..93c10fe1 100644 --- a/src/app/customizer/JsonGenerator/components/Item.jsx +++ b/src/app/customizer/JsonGenerator/components/Item.jsx @@ -28,6 +28,7 @@ const Item = ({ field, handleChange, removeField, controls, categoryData }) => { />