Skip to content

Commit 138e180

Browse files
committed
test(ci): fix expected paths on Windows
1 parent 9cede34 commit 138e180

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

packages/ci/src/lib/monorepo/list-projects.unit.test.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { vol } from 'memfs';
2+
import { join } from 'node:path';
23
import type { PackageJson } from 'type-fest';
34
import { MEMFS_VOLUME } from '@code-pushup/test-utils';
45
import * as utils from '@code-pushup/utils';
@@ -217,19 +218,19 @@ describe('listMonorepoProjects', () => {
217218
}),
218219
).resolves.toEqual([
219220
{
220-
name: 'backend/api',
221+
name: join('backend', 'api'),
221222
bin: 'npx --no-install code-pushup',
222-
directory: `${MEMFS_VOLUME}/backend/api`,
223+
directory: join(MEMFS_VOLUME, 'backend', 'api'),
223224
},
224225
{
225-
name: 'backend/auth',
226+
name: join('backend', 'auth'),
226227
bin: 'npx --no-install code-pushup',
227-
directory: `${MEMFS_VOLUME}/backend/auth`,
228+
directory: join(MEMFS_VOLUME, 'backend', 'auth'),
228229
},
229230
{
230231
name: 'frontend',
231232
bin: 'npx --no-install code-pushup',
232-
directory: `${MEMFS_VOLUME}/frontend`,
233+
directory: join(MEMFS_VOLUME, 'frontend'),
233234
},
234235
] satisfies ProjectConfig[]);
235236
});
@@ -258,22 +259,22 @@ describe('listMonorepoProjects', () => {
258259
{
259260
name: 'my-app',
260261
bin: 'npx --no-install code-pushup',
261-
directory: MEMFS_VOLUME,
262+
directory: join(MEMFS_VOLUME),
262263
},
263264
{
264265
name: 'migrate',
265266
bin: 'npx --no-install code-pushup',
266-
directory: `${MEMFS_VOLUME}/scripts/db/migrate`,
267+
directory: join(MEMFS_VOLUME, 'scripts', 'db', 'migrate'),
267268
},
268269
{
269270
name: 'seed',
270271
bin: 'npx --no-install code-pushup',
271-
directory: `${MEMFS_VOLUME}/scripts/db/seed`,
272+
directory: join(MEMFS_VOLUME, 'scripts', 'db', 'seed'),
272273
},
273274
{
274275
name: 'generate-token',
275276
bin: 'npx --no-install code-pushup',
276-
directory: `${MEMFS_VOLUME}/scripts/generate-token`,
277+
directory: join(MEMFS_VOLUME, 'scripts', 'generate-token'),
277278
},
278279
] satisfies ProjectConfig[]);
279280
});

0 commit comments

Comments
 (0)