-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #753 from WildMeOrg/unit_test
add unit test for frontend
- Loading branch information
Showing
11 changed files
with
420 additions
and
851 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: ["@babel/preset-env", "@babel/preset-react"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
testMatch: [ | ||
"**/__tests__/**/*.[jt]s?(x)", // Looks inside __tests__ folders | ||
"**/?(*.)+(spec|test).[tj]s?(x)", // Looks for .spec.js/.test.js files | ||
], | ||
transform: { | ||
"^.+\\.[t|j]sx?$": "babel-jest", | ||
}, | ||
transformIgnorePatterns: ["/node_modules/(?!(axios)).+\\.js$"], | ||
testEnvironment: "jsdom", // Set the environment for testing React components | ||
moduleNameMapper: { | ||
"^axios$": require.resolve("axios"), | ||
}, | ||
}; |
Oops, something went wrong.