correct win tests again
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -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`,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -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' },
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user