correct win tests again

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-09-16 19:39:33 +02:00
parent 8cc2b97796
commit 30cb16c473
2 changed files with 9 additions and 6 deletions
+5 -2
View File
@@ -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' },
]);
});