Skip to content

Commit ca665fa

Browse files
committed
refactor: fix lint and unit-test
1 parent 2af91f6 commit ca665fa

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

packages/nx-plugin/src/executors/internal/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { logger } from '@nx/devkit';
2-
import { ProcessConfig } from '../../internal/execute-process.js';
2+
import type { ProcessConfig } from '../../internal/execute-process.js';
33

44
export function createCliCommandString(options?: {
55
args?: Record<string, unknown>;

packages/nx-plugin/src/executors/internal/cli.unit.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ describe('createCliCommandObject', () => {
109109
expect(createCliCommandObject({ args: { verbose: true } })).toStrictEqual({
110110
args: ['@code-pushup/cli', '--verbose'],
111111
command: 'npx',
112+
observer: {
113+
onError: expect.any(Function),
114+
onStdout: expect.any(Function),
115+
},
112116
});
113117
});
114118

@@ -120,6 +124,10 @@ describe('createCliCommandObject', () => {
120124
).toStrictEqual({
121125
args: ['@code-pushup/cli', 'autorun', '--verbose'],
122126
command: 'npx',
127+
observer: {
128+
onError: expect.any(Function),
129+
onStdout: expect.any(Function),
130+
},
123131
});
124132
});
125133

@@ -131,6 +139,10 @@ describe('createCliCommandObject', () => {
131139
).toStrictEqual({
132140
args: ['node_modules/@code-pushup/cli/src/bin.js'],
133141
command: 'npx',
142+
observer: {
143+
onError: expect.any(Function),
144+
onStdout: expect.any(Function),
145+
},
134146
});
135147
});
136148
});

0 commit comments

Comments
 (0)