tape-testing / tape

tap-producing test harness for node and browsers
MIT License
5.77k stars 307 forks source link

CLI accept multiple directories and execute in order #580

Closed darcyrush closed 2 years ago

darcyrush commented 2 years ago

Currently I am using the CLI with a pretty reporter and code coverage tools;

ts-node --transpileOnly node_modules/tape/bin/tape 'test/{unit,integration}/**/*.test.ts' | tap-arc

When I execute my tests, the integration tests are triggered before my unit tests which gets in the way of failing fast. I imagine this is the ordering of the glob output (i < u). I could use separate commands but I'm not sure how I can then pipe the combined output to a pretty reporter or a code coverage tool.

It would be nice if the CLI accepted multiple path arguments, executed them in order and combined the output

ts-node --transpileOnly node_modules/tape/bin/tape 'test/unit/**/*.test.ts test/integration/**/*.test.ts' | tap-arc

Or does someone have a more simple suggestion ?

ljharb commented 2 years ago

That seems like reasonable behavior - does it not already do that?

darcyrush commented 2 years ago

It absolutely does, I just somehow messed up bash escaping. Thank you for the quick response and library.