Преглед на файлове

chore(create-pyth-package): added jest tests

benduran преди 1 седмица
родител
ревизия
9ae787c75b

+ 0 - 0
packages/create-pyth-package/bin/create-pyth-app → packages/create-pyth-package/bin/create-pyth-package


+ 3 - 0
packages/create-pyth-package/src/templates/cli/jest.config.js

@@ -0,0 +1,3 @@
+import { defineJestConfig } from "@pythnetwork/jest-config/define-config";
+
+export default defineJestConfig();

+ 2 - 1
packages/create-pyth-package/src/templates/cli/package.json

@@ -26,7 +26,8 @@
     "prepublishOnly": "pnpm run build && pnpm run test:lint",
     "start:dev": "tsx ./src/index.ts",
     "test:lint": "eslint src/ --max-warnings 0",
-    "test:format": "prettier --check \"src/**/*.ts\""
+    "test:format": "prettier --check \"src/**/*.ts\"",
+    "test:unit": "jest"
   },
   "devDependencies": {
     "@cprussin/eslint-config": "catalog:",

+ 3 - 0
packages/create-pyth-package/src/templates/library/jest.config.js

@@ -0,0 +1,3 @@
+import { defineJestConfig } from "@pythnetwork/jest-config/define-config";
+
+export default defineJestConfig();

+ 2 - 1
packages/create-pyth-package/src/templates/library/package.json

@@ -21,7 +21,8 @@
     "fix:format": "prettier --write .",
     "test:lint": "eslint . --max-warnings 0",
     "test:format": "prettier --check .",
-    "test:types": "tsc"
+    "test:types": "tsc",
+    "test:unit": "jest"
   },
   "devDependencies": {
     "@cprussin/eslint-config": "catalog:",

+ 3 - 0
packages/create-pyth-package/src/templates/web-app/jest.config.js

@@ -0,0 +1,3 @@
+import { defineJestConfigForNextJs } from "@pythnetwork/jest-config/define-next-config";
+
+export default defineJestConfigForNextJs();

+ 2 - 1
packages/create-pyth-package/src/templates/web-app/package.json

@@ -23,7 +23,8 @@
     "test:format": "prettier --check .",
     "test:lint:eslint": "eslint . --max-warnings 0",
     "test:lint:stylelint": "stylelint 'src/**/*.scss' --max-warnings 0",
-    "test:types": "tsc"
+    "test:types": "tsc",
+    "test:unit": "jest"
   },
   "devDependencies": {
     "@axe-core/react": "catalog:",