coral-xyz / anchor

⚓ Solana Sealevel Framework
https://anchor-lang.com
Apache License 2.0
3.64k stars 1.33k forks source link

feature suggestion: remove third party test suites from defaults, just use node #2839

Open mikemaccana opened 7 months ago

mikemaccana commented 7 months ago

Anchor supports mocha / ts-mocha by default, and jest / ts-jest as an option, but as you know ts-mocha doesn't seem well maintained any more and there's little need to add a third party test suite when there's one built into node.

In src/tests/whatever.ts

import { before, describe, test } from "node:test";

And in Anchor.toml (I use esrun but any modern TS runner is fine).

[scripts]
test = "npx esrun tests/reveal.test.ts"

Less dependencies means less things to break or track upstream bugs.

acheroncrypto commented 7 months ago

It's always good to have less dependencies, so I support this feature.