Quick start
-
Install the runner.
Terminal window pnpm add -D @argus/cli -
Write a test. No import of the test API is needed —
describe,test,it,expectand the hooks are installed as globals inside the Hermes realm.src/money.test.ts import { formatCents } from './money';describe('formatCents', () => {test('formats whole euros', () => {expect(formatCents(1200)).toBe('12.00');});test('rounds half up', () => {expect(formatCents(1205)).toBe('12.05');});test('rejects a negative amount', () => {expect(() => formatCents(-1)).toThrow(RangeError);});}); -
Run it.
Terminal window pnpm exec argus "src/**/*.test.ts"✓ hermes v1 hermes-v250829098.0.16 · prebuilt darwin-arm64 · ~/.argus/cache/…/bin/hermesformatCents✓ formats whole euros✓ rounds half up✓ rejects a negative amount3 passed, 0 failed, 0 todo, 3 total (41 ms in Hermes)1 files: 1 passed, 0 failed3 tests: 3 passed, 0 failed, 0 todo -
Break it on purpose, so you can see what a failure looks like.
test('rounds half up', () => {expect(formatCents(1205)).toBe('12.06'); // wrong});formatCents✓ formats whole euros✗ rounds half up — expected "12.06" but received "12.05"at src/money.test.ts:8:34✓ rejects a negative amount2 passed, 1 failed, 0 todo, 3 total (39 ms in Hermes)The frame says
src/money.test.ts:8, notrun.argus-bundle.js:2418. Stacks are remapped through the bundle’s source map before anything is printed — see Source maps. -
Add it to
package.jsonso it runs like any other check.package.json {"scripts": {"test:hermes": "argus \"src/**/*.test.ts\" \"src/**/*.test.tsx\""}}
What just happened
Section titled “What just happened”For that one file, Argus:
- Read
node_modules/react-nativeto find which Hermes engine and version your project pins. - Resolved a binary for it — cache, then the published prebuilt, verifying its checksum.
- Bundled the test and its imports into a single sealed IIFE, lowered to the Hermes syntax envelope, with an external source map.
- Spawned
hermeson that file, in its own process. - Read back exactly one framed result line carrying a private per-run nonce.
- Remapped every stack frame to your source, and rendered the report.
Where to go next
Section titled “Where to go next”- Test structure — hooks,
.skip/.only/.todo, nesting. - Matchers — the full
expectsurface. - Mocks & spies —
argus.fn(),argus.spyOn(), call matchers. - Component testing —
render,screen,fireEvent. - Command and flags — timeouts, concurrency, engine selection.