Skip to content

Commit 5f11dbc

Browse files
committed
chore(native): remove false-green TypeScript suites now covered by Rust tests
The three native examples now have real LiteSVM Rust tests, so their TypeScript suites — which imported from `node:test` but ran under `ts-mocha`, executing zero tests (false green) — are removed along with their now-unused JS tooling (ts-mocha, mocha, chai, solana-bankrun, etc.) and tsconfig.json. `build-and-test` is rewired to just build the program .so into tests/fixtures, which is what the LiteSVM `cargo test` consumes; the empty lockfiles keep `pnpm install --frozen-lockfile` passing in CI. Also fix the stale .gitignore exception path for the escrow Cargo.lock (escrow moved from tokens/ to finance/) and document the real reason it stays tracked (standalone, non-workspace crate).
1 parent 1e39179 commit 5f11dbc

16 files changed

Lines changed: 12 additions & 5865 deletions

File tree

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ node_modules/
88
**/*/node_modules
99
**/*/package-lock.json
1010
**/*/Cargo.lock
11-
# Exception: escrow native needs Cargo.lock to pin blake3 (see tokens/escrow/native/Cargo.toml)
12-
!tokens/escrow/native/Cargo.lock
11+
# Exception: escrow native is a standalone (non-workspace) crate, so it keeps
12+
# its Cargo.lock tracked for reproducible builds.
13+
!finance/escrow/native/Cargo.lock
1314

1415
**/*/.anchor
1516
**/*/.DS_Store

finance/escrow/native/package.json

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
{
22
"scripts": {
3-
"test": "pnpm ts-mocha -p ./tsconfig.json -t 1000000 ./tests/test.ts",
4-
"build-and-test": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./tests/fixtures && pnpm test",
3+
"build-and-test": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./tests/fixtures",
54
"build": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so",
6-
"deploy": "solana program deploy ./program/target/so/program.so"
7-
},
8-
"dependencies": {
9-
"@solana/spl-token": "^0.4.9",
10-
"@solana/web3.js": "^1.98.4",
11-
"bn.js": "^5.2.2"
12-
},
13-
"devDependencies": {
14-
"@types/bn.js": "^5.1.0",
15-
"@types/chai": "^4.3.1",
16-
"@types/mocha": "^10.0.9",
17-
"@types/node": "^22.8.6",
18-
"borsh": "^2.0.0",
19-
"chai": "^4.3.4",
20-
"mocha": "^10.8.2",
21-
"solana-bankrun": "^0.4.0",
22-
"ts-mocha": "^10.0.0",
23-
"typescript": "^5"
5+
"deploy": "solana program deploy ./program/target/so/escrow_native_program.so"
246
}
257
}

0 commit comments

Comments
 (0)