Closed AuroraLantean closed 2 months ago
When I changed
yarn
intobun
,anchor test
command failed.
Why did it fail? Anchor just runs the command you specify, so if it doesn't work, it's related more to the testing tool you use rather than Anchor.
After updating my tools, I got it working!
rustc 1.80.1 (3f5fd8dd4 2024-08-06),
solana-cli 1.18.18 (src:83047136; feat:4215500110, client:SolanaLabs),
pnpm 9.9.0,
yarn 1.22.22 ... installed via pnpm install -g yarn
bun 1.1.26
anchor 0.29.0
To run a test:
test = "bun run ts-mocha -p ./tsconfig.json -t 1000000 tests/my-test1.ts"
Why does Anchor lock JS package manager and runtime to Yarn? PNPM saves more disk spaces in installing JS packages. Bun runs much faster and supports TypeScript natively.
I can use
pnpm
to reinstall everything after importingyarn.lock
, and deletingnode_modules
But in the Anchor.toml
When I changed
yarn
intobun
,anchor test
command failed.Please advise. Thanks