Skip to content

Commit

Permalink
fix(nx-plugin): fix test for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Jul 12, 2024
1 parent d616159 commit 4fed38c
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions packages/nx-plugin/src/executors/internal/config.unit.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { afterEach, beforeEach, describe, expect } from 'vitest';
import { toUnixPath } from '@code-pushup/test-utils';
import { ENV } from '../../../mock/fixtures/env';
import { globalConfig, persistConfig, uploadConfig } from './config';

Expand Down Expand Up @@ -65,24 +64,19 @@ describe('globalConfig', () => {
});

it('should provide default global config options', () => {
expect(
globalConfig(
{},
{
workspaceRoot: '/test/root/workspace-root',
projectConfig: {
name: 'my-app',
root: 'packages/project-root',
},
const { config } = globalConfig(
{},
{
workspaceRoot: '/test/root/workspace-root',
projectConfig: {
name: 'my-app',
root: 'packages/project-root',
},
),
).toStrictEqual(
expect.objectContaining({
config: expect.stringContaining(
toUnixPath('packages/project-root/code-pushup.config.json'),
),
}),
},
);
// to avoid problems with OS paths we write 2 lines to test the path
expect(config).toEqual(expect.stringContaining('project-root'));
expect(config).toEqual(expect.stringContaining('code-pushup.config.json'));
});

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

0 comments on commit 4fed38c

Please sign in to comment.