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 11import { afterEach , beforeEach , describe , expect } from 'vitest' ;
2- import { toUnixPath } from '@code-pushup/test-utils' ;
32import { ENV } from '../../../mock/fixtures/env' ;
43import { 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' , ( ) => {
You can’t perform that action at this time.
0 commit comments