CodeVetter · Repo Unpack · Testing signals
adonisjs/core
Tests and CI were inspected, not executed; no passing result or coverage percentage is asserted. The Japa runner discovers repository specs and enables assertion, type, filesystem, and snapshot plugins. Inspected tests cover lifecycle transitions, actual HTTP interactions, validation, scaffolding, codegen order, file-format preservation, and encryption compatibility. Some tests perform real package installation or bind ports, so execution is not purely isolated computation. The inventory and coverage assessment are bounded rather than exhaustive.
- bin/test.ts processes runner arguments, discovers tests/**/*.spec.ts, installs assert/expectTypeOf/fileSystem/snapshot plugins, and calls run; these definitions were inspected without execution.
- npm test runs lint first and invokes quick:test with NODE_DEBUG=adonisjs:core; quick:test starts bin/test.ts with the TypeScript import hook and --force-exit.
- HTTP lifecycle specs use Supertest against a real started server and assert response content, default port behavior, shutdown, occupied-port rejection, and crash exit status.
- An Ace regression test exercises a staysAlive command calling app.terminate during run and asserts both process.exitCode=1 and terminated application state.
- Validation specs assert required-field error details, successful output and inferred TypeScript type, and tryValidateUsing success/error tuples.
- Controller command tests compare exact generated contents, verify existing files are skipped, cover singular API/action variants, and exercise absolute contents-from input.
- Codegen tests check missing-assembler handling, warmed web state, route declaration output without routes.json, and the requirement to generate controller indexes before providers boot.
- Codemods tests assert CRLF/indentation, minified JSON, BOM preservation, existing-alias immutability, and missing-file errors; installation tests actually request @adonisjs/assembler and assert its node_modules directory.
- Legacy encryption specs assert rejection of tampered ciphertext, MAC, and IV, cross-decryption with the old v6 encrypter in both directions, and compatible 16-byte ASCII-safe IV encoding.
- safeTiming tests cover minimum duration, returned values, slow callbacks, early return, and thrown Error objects; the inspected file does not exercise falsy thrown values. Dumper tests exercise HTML, CSP nonce, ANSI output, and dd exceptions, without adversarial title/link inputs in that file.
- CI definitions were inspected, not executed: checks delegates test, lint, and typecheck jobs; test.yml runs npm test on Linux and Windows with lts/krypton and latest Node, while release verifies built command files.
- c8 configuration lists text/html reporters and excludes tests, build, factories, and .yalc; the inspected npm test and CI test commands do not invoke c8 or specify a coverage threshold.