Skip to content

Commit 2b77ed8

Browse files
committed
fix tests
1 parent f5481fd commit 2b77ed8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/helpers/deviceId.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { getDeviceId } from "@mongodb-js/device-id";
2-
// Important: don't import the default module as that doesn't work for cjs module resolution.
3-
import { machineId } from "node-machine-id";
2+
import * as nodeMachineId from "node-machine-id";
43
import type { LoggerBase } from "../common/logger.js";
54
import { LogId } from "../common/logger.js";
65

@@ -18,7 +17,7 @@ export class DeviceId {
1817
private constructor(logger: LoggerBase, timeout: number = DEVICE_ID_TIMEOUT) {
1918
this.logger = logger;
2019
this.timeout = timeout;
21-
this.getMachineId = (): Promise<string> => machineId(true);
20+
this.getMachineId = (): Promise<string> => nodeMachineId.machineId(true);
2221
this.abortController = new AbortController();
2322

2423
this.deviceIdPromise = DeviceId.UnknownDeviceId;

src/transports/streamableHttp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export class StreamableHttpRunner extends TransportRunnerBase {
166166
this.logger.info({
167167
id: LogId.streamableHttpTransportStarted,
168168
context: "streamableHttpTransport",
169-
message: `Server started on http://${this.userConfig.httpHost}:${this.userConfig.httpPort}`,
169+
message: `Server started on ${this.address}`,
170170
noRedaction: true,
171171
});
172172
}

tests/integration/build.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ describe("Build Test", () => {
4747
"Telemetry",
4848
"StreamableHttpRunner",
4949
"defaultUserConfig",
50+
"LoggerBase",
5051
]);
5152
});
5253
});

0 commit comments

Comments
 (0)