Skip to content

Commit 4fed38c

Browse files
committed
fix(nx-plugin): fix test for windows
1 parent d616159 commit 4fed38c

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

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

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { afterEach, beforeEach, describe, expect } from 'vitest';
2-
import { toUnixPath } from '@code-pushup/test-utils';
32
import { ENV } from '../../../mock/fixtures/env';
43
import { globalConfig, persistConfig, uploadConfig } from './config';
54

@@ -65,24 +64,19 @@ describe('globalConfig', () => {
6564
});
6665

6766
it('should provide default global config options', () => {
68-
expect(
69-
globalConfig(
70-
{},
71-
{
72-
workspaceRoot: '/test/root/workspace-root',
73-
projectConfig: {
74-
name: 'my-app',
75-
root: 'packages/project-root',
76-
},
67+
const { config } = globalConfig(
68+
{},
69+
{
70+
workspaceRoot: '/test/root/workspace-root',
71+
projectConfig: {
72+
name: 'my-app',
73+
root: 'packages/project-root',
7774
},
78-
),
79-
).toStrictEqual(
80-
expect.objectContaining({
81-
config: expect.stringContaining(
82-
toUnixPath('packages/project-root/code-pushup.config.json'),
83-
),
84-
}),
75+
},
8576
);
77+
// to avoid problems with OS paths we write 2 lines to test the path
78+
expect(config).toEqual(expect.stringContaining('project-root'));
79+
expect(config).toEqual(expect.stringContaining('code-pushup.config.json'));
8680
});
8781

8882
it('should parse global config options', () => {

0 commit comments

Comments
 (0)