Skip to content

Commit b3b1b42

Browse files
authored
Tests: Utils.verifyMessage (#54)
This PR adds test framework dependencies and a couple of tests used to upgrade dependencies safely. Also removes unused dependencies (cf https://github.com/BitteProtocol/make-agent/pull/33/files#r1942415165) Benefit of this test: 1. Allowed us to upgrade both `near-api-js` and `borsh` safely and with confidence. Future updates of these dependencies will trigger a failed test if the dependency migration was unsuccessful. 2. Providing confidence/stability in the internal logic of the tool kit. Note that this PR includes two additional ones #57 and #58
1 parent 06c98d7 commit b3b1b42

File tree

6 files changed

+824
-1594
lines changed

6 files changed

+824
-1594
lines changed

.github/workflows/pull-request.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ jobs:
4242

4343
- name: Lint Full Project
4444
run: pnpm run lint
45+
46+
- name: Test Full Project
47+
run: pnpm run test

package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"build:ui": "cd ./src/playground && rm -rf ./dist && pnpm run build",
2525
"prepublishOnly": "pnpm run build",
2626
"lint": "prettier --check '{src,tests}/**/*.{js,ts}' && eslint . --ignore-pattern dist/",
27-
"fmt": "prettier --write '{src,tests}/**/*.{js,ts}' && pnpm run lint --fix"
27+
"fmt": "prettier --write '{src,tests}/**/*.{js,ts}' && pnpm run lint --fix",
28+
"test": "vitest",
29+
"test:coverage": "vitest run --coverage"
2830
},
2931
"keywords": [
3032
"ai",
@@ -35,17 +37,15 @@
3537
"license": "MIT",
3638
"dependencies": {
3739
"@apidevtools/swagger-parser": "^10.1.0",
38-
"borsh": "^0.7.0",
40+
"borsh": "^2.0.0",
3941
"commander": "^12.1.0",
4042
"dotenv": "^16.4.5",
4143
"express": "^4.21.2",
4244
"inquirer": "^12.0.0",
4345
"is-port-reachable": "^4.0.0",
4446
"js-sha256": "^0.11.0",
4547
"localtunnel": "^2.0.2",
46-
"near-api-js": "^4.0.3",
47-
"near-ca": "^0.8.1",
48-
"near-safe": "^0.9.6",
48+
"near-api-js": "^5.0.1",
4949
"open": "^10.1.0"
5050
},
5151
"devDependencies": {
@@ -56,12 +56,14 @@
5656
"@types/node": "^22.7.2",
5757
"@typescript-eslint/eslint-plugin": "^8.15.0",
5858
"@typescript-eslint/parser": "^8.23.0",
59+
"@vitest/coverage-v8": "^3.0.5",
5960
"ajv": "^8.17.1",
6061
"eslint": "^9.15.0",
6162
"eslint-plugin-import": "^2.31.0",
6263
"prettier": "^3.4.2",
6364
"tsup": "^8.3.6",
6465
"tsx": "^4.7.1",
65-
"typescript": "^5.7.3"
66+
"typescript": "^5.7.3",
67+
"vitest": "^3.0.5"
6668
}
6769
}

0 commit comments

Comments
 (0)