Skip to content

Commit 3baf124

Browse files
committed
Fix test error, update tests to use path module
1 parent 4f76c86 commit 3baf124

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/rush-lib/src/cli/test/RushCommandLineParser.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,15 @@ describe('RushCommandLineParser', () => {
237237
expect.stringMatching(expectedBuildTaskRegexp)
238238
]));
239239
expect(firstSpawn[SPAWN_ARG_OPTIONS]).toEqual(expect.any(Object));
240-
expect(firstSpawn[SPAWN_ARG_OPTIONS].cwd).toEqual(resolve(__dirname, `${repoName}/a`));
240+
expect(firstSpawn[SPAWN_ARG_OPTIONS].cwd).toEqual(path.resolve(__dirname, `${repoName}/a`));
241241

242242
// tslint:disable-next-line: no-any
243243
const secondSpawn: any[] = instance.spawnMock.mock.calls[1];
244244
expect(secondSpawn[SPAWN_ARG_ARGS]).toEqual(expect.arrayContaining([
245245
expect.stringMatching(expectedBuildTaskRegexp)
246246
]));
247247
expect(secondSpawn[SPAWN_ARG_OPTIONS]).toEqual(expect.any(Object));
248-
expect(secondSpawn[SPAWN_ARG_OPTIONS].cwd).toEqual(resolve(__dirname, `${repoName}/b`));
248+
expect(secondSpawn[SPAWN_ARG_OPTIONS].cwd).toEqual(path.resolve(__dirname, `${repoName}/b`));
249249
});
250250
});
251251
});
@@ -270,15 +270,15 @@ describe('RushCommandLineParser', () => {
270270
expect.stringMatching(expectedBuildTaskRegexp)
271271
]));
272272
expect(firstSpawn[SPAWN_ARG_OPTIONS]).toEqual(expect.any(Object));
273-
expect(firstSpawn[SPAWN_ARG_OPTIONS].cwd).toEqual(resolve(__dirname, `${repoName}/a`));
273+
expect(firstSpawn[SPAWN_ARG_OPTIONS].cwd).toEqual(path.resolve(__dirname, `${repoName}/a`));
274274

275275
// tslint:disable-next-line: no-any
276276
const secondSpawn: any[] = instance.spawnMock.mock.calls[1];
277277
expect(secondSpawn[SPAWN_ARG_ARGS]).toEqual(expect.arrayContaining([
278278
expect.stringMatching(expectedBuildTaskRegexp)
279279
]));
280280
expect(secondSpawn[SPAWN_ARG_OPTIONS]).toEqual(expect.any(Object));
281-
expect(secondSpawn[SPAWN_ARG_OPTIONS].cwd).toEqual(resolve(__dirname, `${repoName}/b`));
281+
expect(secondSpawn[SPAWN_ARG_OPTIONS].cwd).toEqual(path.resolve(__dirname, `${repoName}/b`));
282282
});
283283
});
284284
});

0 commit comments

Comments
 (0)