Skip to content

Commit fdeb3da

Browse files
committed
feat: automatically use dot reporter when running inside AI Agent
1 parent 01ac0f8 commit fdeb3da

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"@japa/core": "^10.4.0",
5959
"@japa/errors-printer": "^4.1.4",
6060
"@poppinss/colors": "^4.1.6",
61+
"@poppinss/utils": "7.0.0-next.6",
6162
"@poppinss/hooks": "^7.3.0",
6263
"@poppinss/string": "^1.7.1",
6364
"error-stack-parser-es": "^1.0.5",

src/config_manager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import debug from './debug.js'
1111
import { Refiner } from '../modules/core/main.js'
12+
import { isRunningInAIAgent } from '@poppinss/utils'
1213
import { dot, github, ndjson, spec } from './reporters/main.js'
1314
import type { CLIArgs, Config, Filters, NormalizedBaseConfig, NormalizedConfig } from './types.js'
1415

@@ -24,7 +25,9 @@ const DEFAULTS = {
2425
forceExit: false,
2526
plugins: [],
2627
reporters: {
27-
activated: ['spec'].concat(process.env.GITHUB_ACTIONS === 'true' ? ['github'] : []),
28+
activated: isRunningInAIAgent()
29+
? ['dot']
30+
: ['spec'].concat(process.env.GITHUB_ACTIONS === 'true' ? ['github'] : []),
2831
list: [spec(), ndjson(), dot(), github()],
2932
},
3033
importer: (filePath) => import(filePath.href),

0 commit comments

Comments
 (0)