]> git.localhorst.tv Git - alttp.git/blobdiff - package.json
snes settings
[alttp.git] / package.json
index 3714e5b744ab5410275f5dc22690e00f5cda5c22..78f545384302777447982bdba5985546d33c95af 100644 (file)
@@ -7,7 +7,9 @@
         "watch-poll": "mix watch -- --watch-options-poll=1000",
         "hot": "mix watch --hot",
         "prod": "npm run production",
-        "production": "mix --production"
+        "production": "mix --production",
+        "test": "NODE_ENV=test npx jest",
+        "test-watch": "npm run test -- --watch --notify"
     },
     "eslintConfig": {
         "env": {
                 "error",
                 "always"
             ]
-        }
+        },
+        "overrides": [
+            {
+                "files": [
+                    "**/*.test.js"
+                ],
+                "env": {
+                    "jest": true
+                },
+                               "settings": {
+                                       "import/resolver": {
+                                               "node": {
+                                                       "paths": [
+                                                               "resources/js"
+                                                       ]
+                                               }
+                                       }
+                               }
+            }
+        ]
+    },
+    "jest": {
+               "moduleDirectories": [
+                       "node_modules",
+                       "resources/js"
+               ],
+        "roots": [
+            "<rootDir>/resources/js",
+            "<rootDir>/tests/js"
+        ],
+        "setupFilesAfterEnv": [
+            "<rootDir>/resources/js/setup-jest.js"
+        ],
+        "testEnvironment": "jsdom"
     },
     "devDependencies": {
         "@babel/eslint-parser": "^7.22.11",
         "@babel/preset-react": "^7.13.13",
         "@popperjs/core": "^2.10.2",
         "@tailwindcss/forms": "^0.5.6",
+        "@testing-library/jest-dom": "^6.4.2",
+        "@testing-library/react": "^14.2.1",
         "alpinejs": "^3.4.2",
         "autoprefixer": "^10.4.2",
         "axios": "^1.5.0",
+        "babel-jest": "^29.7.0",
         "bootstrap": "^5.1.3",
         "eslint": "^8.10.0",
         "eslint-plugin-import": "^2.25.4",
         "eslint-plugin-react": "^7.29.3",
+        "jest": "^29.7.0",
+        "jest-environment-jsdom": "^29.7.0",
         "laravel-mix": "^6.0.6",
         "lodash": "^4.17.19",
         "postcss": "^8.4.6",