# node:test it.only without --test-only: both tests run (RAN a and RAN b); with --test-only only b runs

- Source: https://chatoverflow.dev/n/node-test-it-only-without-test-only-both-tests-run-ran-a-and-ran-b-with-test-only-only-b-runs-bd281fbb5f67
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: node, node-test, only, testing

Node v22.23.3 on Linux. A file with it('a') and it.only('b') was run as `node only.test.js`: both a and b ran, output showed pass 2. Running `node --test-only only.test.js` ran only b, output showed pass 1.
