File tree Expand file tree Collapse file tree 1 file changed +11
-17
lines changed
packages/nx-plugin/src/executors/internal Expand file tree Collapse file tree 1 file changed +11
-17
lines changed Original file line number Diff line number Diff line change 1
1
import { afterEach , beforeEach , describe , expect } from 'vitest' ;
2
- import { toUnixPath } from '@code-pushup/test-utils' ;
3
2
import { ENV } from '../../../mock/fixtures/env' ;
4
3
import { globalConfig , persistConfig , uploadConfig } from './config' ;
5
4
@@ -65,24 +64,19 @@ describe('globalConfig', () => {
65
64
} ) ;
66
65
67
66
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' ,
77
74
} ,
78
- ) ,
79
- ) . toStrictEqual (
80
- expect . objectContaining ( {
81
- config : expect . stringContaining (
82
- toUnixPath ( 'packages/project-root/code-pushup.config.json' ) ,
83
- ) ,
84
- } ) ,
75
+ } ,
85
76
) ;
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' ) ) ;
86
80
} ) ;
87
81
88
82
it ( 'should parse global config options' , ( ) => {
You can’t perform that action at this time.
0 commit comments