Skip to content

Commit 6df53af

Browse files
author
Michael Hladky
committed
refactor: wip
1 parent df0ec9c commit 6df53af

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

packages/nx-plugin/src/executors/cli/executor.int.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ describe('runAutorunExecutor', () => {
2727
});
2828

2929
it('should normalize context, parse CLI options and execute command', async () => {
30+
expect(process.env).toStrictEqual(
31+
expect.not.objectContaining({
32+
CP_VERBOSE: 'true',
33+
}),
34+
);
3035
const output = await runAutorunExecutor(
3136
{ verbose: true },
3237
executorContext('utils'),
@@ -47,9 +52,12 @@ describe('runAutorunExecutor', () => {
4752
command: 'npx',
4853
args: expect.arrayContaining(['@code-pushup/cli']),
4954
cwd: process.cwd(),
50-
env: expect.objectContaining({
55+
});
56+
57+
expect(process.env).toStrictEqual(
58+
expect.objectContaining({
5159
CP_VERBOSE: 'true',
5260
}),
53-
});
61+
);
5462
});
5563
});

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,13 @@ describe('runAutorunExecutor', () => {
119119
command: 'npx',
120120
args: expect.arrayContaining(['@code-pushup/cli']),
121121
cwd: '<CWD>',
122-
env: expect.objectContaining({
122+
});
123+
124+
expect(process.env).toStrictEqual(
125+
expect.objectContaining({
123126
CP_VERBOSE: 'true',
124127
}),
125-
});
128+
);
126129

127130
expect(output.command).not.toContain('--verbose');
128131
expect(logger.warn).toHaveBeenCalledTimes(0);

0 commit comments

Comments
 (0)