Skip to content

Commit 0595018

Browse files
authored
import debug instead of the alias (#10093)
1 parent 5991a9c commit 0595018

File tree

1 file changed

+4
-4
lines changed
  • packages/wrangler/e2e/unenv-preset/worker

1 file changed

+4
-4
lines changed

packages/wrangler/e2e/unenv-preset/worker/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,15 @@ export async function testTls() {
213213
}
214214

215215
export async function testDebug() {
216-
// @ts-expect-error "@cloudflare/unenv-preset/npm/debug" is an unenv alias, it does not exist as a module.
217-
const debug = await import("@cloudflare/unenv-preset/npm/debug");
216+
// @ts-expect-error "debug" is an unenv alias, not installed locally
217+
const debug = (await import("debug")).default;
218218
const logs: string[] = [];
219219

220220
// Append all logs to the array instead of logging to console
221-
debug.default.log = (...args: string[]) =>
221+
debug.log = (...args: string[]) =>
222222
logs.push(args.map((arg) => arg.toString()).join(" "));
223223

224-
const exampleLog = debug.default("example");
224+
const exampleLog = debug("example");
225225
const testLog = exampleLog.extend("test");
226226

227227
exampleLog("This is an example log");

0 commit comments

Comments
 (0)