Bläddra i källkod

Merge pull request #2454 from medusajs/chore/ignore-.medusa-folder

jest ignore .medusa folder
Carlos R. L. Rodrigues 7 månader sedan
förälder
incheckning
21e09f6877
1 ändrade filer med 8 tillägg och 8 borttagningar
  1. 8 8
      jest.config.js

+ 8 - 8
jest.config.js

@@ -1,5 +1,5 @@
-const { loadEnv } = require('@medusajs/utils')
-loadEnv('test', process.cwd())
+const { loadEnv } = require("@medusajs/utils");
+loadEnv("test", process.cwd());
 
 module.exports = {
   transform: {
@@ -14,13 +14,13 @@ module.exports = {
   },
   testEnvironment: "node",
   moduleFileExtensions: ["js", "ts", "json"],
-  modulePathIgnorePatterns: ["dist/"],
-}
+  modulePathIgnorePatterns: ["dist/", "<rootDir>/.medusa/"],
+};
 
 if (process.env.TEST_TYPE === "integration:http") {
-  module.exports.testMatch = ["**/integration-tests/http/*.spec.[jt]s"]
+  module.exports.testMatch = ["**/integration-tests/http/*.spec.[jt]s"];
 } else if (process.env.TEST_TYPE === "integration:modules") {
-  module.exports.testMatch = ["**/src/modules/*/__tests__/**/*.[jt]s"]
+  module.exports.testMatch = ["**/src/modules/*/__tests__/**/*.[jt]s"];
 } else if (process.env.TEST_TYPE === "unit") {
-  module.exports.testMatch = ["**/src/**/__tests__/**/*.unit.spec.[jt]s"]
-}
+  module.exports.testMatch = ["**/src/**/__tests__/**/*.unit.spec.[jt]s"];
+}