Skip to content

Commit a1fbbc2

Browse files
committed
test: consider prefix for custom log location
1 parent 15b222b commit a1fbbc2

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

packages/cli-repl/src/cli-repl.spec.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,18 +1470,12 @@ describe('CliRepl', function () {
14701470
expect(await cliRepl.getConfig('logLocation')).equals(
14711471
customLogHomePath
14721472
);
1473-
expect(cliRepl.logWriter?.logFilePath).equals(
1474-
path.join(
1475-
customLogHomePath,
1476-
'mongosh_' + (cliRepl.logWriter?.logId as string) + '_log'
1477-
)
1478-
);
1479-
expect(cliRepl.getLogPath()).equals(
1480-
path.join(
1481-
customLogLocation.path,
1482-
(cliRepl.logWriter?.logId as string) + '_log'
1483-
)
1473+
const logName = path.join(
1474+
customLogHomePath,
1475+
'mongosh_' + (cliRepl.logWriter?.logId as string) + '_log'
14841476
);
1477+
expect(cliRepl.logWriter?.logFilePath).equals(logName);
1478+
expect(cliRepl.getLogPath()).equals(path.join(logName));
14851479
});
14861480

14871481
it('can set log retention days', async function () {

0 commit comments

Comments
 (0)