mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 07:33:12 +09:00
Only print test output for failing tests
A spec reporter subclass buffers console output, including winston's ConsoleTransport and the integration child process lines, and prints it above the failure line when a test or hook fails. VERBOSE_TEST streams everything as before, and CI sets it on debug re-runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5cf14eb15b
commit
838a43428b
4 files changed
+47
-1
No files matched your search
@@ -197,6 +197,8 @@ Use `pnpm run fast-test` to skip tests marked as slow, or `pnpm run no-external-
|
||||
These correspond to setting the `FAST_TEST` and `NO_EXTERNAL_TEST` environment variables and can be combined.
|
||||
For example, `FAST_TEST=y NO_EXTERNAL_TEST=y pnpm test` combines both exclusions.
|
||||
These flags still run the remaining integration setup and tests; neither produces an isolated unit-test run.
|
||||
Console and log output is only printed for tests and hooks that fail, just above the failure.
|
||||
Set `VERBOSE_TEST=y` to print all of it as it happens, or re-run a CI job with debug logging enabled.
|
||||
When writing slow tests call `slowTest(this)`, and for external API tests call `externalTest(this)`; both are exported from `test/common.js`.
|
||||
For tests that need a Factorio installation, call `requiresFactorio(this)` in the test or pass the suite to `requiresFactorio`, imported from `test/integration/index.js`.
|
||||
`test/common.js` also provides JSON round-trip/schema helpers, and `test/mock.js` provides shared mocks.
|
||||
|
||||
Reference in new issue
Block a user