diff --git a/packages/config-loader/src/loader.test.ts b/packages/config-loader/src/loader.test.ts index c9443f8d85..ff6d5b2551 100644 --- a/packages/config-loader/src/loader.test.ts +++ b/packages/config-loader/src/loader.test.ts @@ -20,6 +20,9 @@ import mockFs from 'mock-fs'; import fs from 'fs-extra'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; +import { resolve as resolvePath, sep } from 'path'; + +const root = resolvePath('/'); describe('loadConfig', () => { const server = setupServer(); @@ -132,7 +135,7 @@ describe('loadConfig', () => { escaped: '${Escaped}', }, }, - path: '/root/app-config.yaml', + path: `${root}root${sep}app-config.yaml`, }, ], }); @@ -318,7 +321,7 @@ describe('loadConfig', () => { escaped: '${Escaped}', }, }, - path: '/root/app-config.yaml', + path: `${root}root${sep}app-config.yaml`, }, ], }); diff --git a/packages/config-loader/src/sources/ConfigSources.test.ts b/packages/config-loader/src/sources/ConfigSources.test.ts index cbdb405cb6..9a02b684ab 100644 --- a/packages/config-loader/src/sources/ConfigSources.test.ts +++ b/packages/config-loader/src/sources/ConfigSources.test.ts @@ -93,7 +93,7 @@ describe('ConfigSources', () => { targets: [{ type: 'path', target: '/config.yaml' }], }), ), - ).toEqual([{ name: 'FileConfigSource', path: `${root}config.yaml` }]); + ).toEqual([{ name: 'FileConfigSource', path: '/config.yaml' }]); const subFunc = async () => undefined; expect( @@ -193,9 +193,9 @@ describe('ConfigSources', () => { ]), ), ).toEqual([ - { name: 'FileConfigSource', path: `${root}a.yaml` }, - { name: 'FileConfigSource', path: `${root}b.yaml` }, - { name: 'FileConfigSource', path: `${root}c.yaml` }, + { name: 'FileConfigSource', path: '/a.yaml' }, + { name: 'FileConfigSource', path: '/b.yaml' }, + { name: 'FileConfigSource', path: '/c.yaml' }, ]); });