Skip to content

Commit c454a93

Browse files
authored
Merge pull request #4799 from easyops-cn/steve/v3-test
fix(): disable debugger tips in test env
2 parents 26373dd + 14c5928 commit c454a93

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/runtime/src/internal/debugManager.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,6 @@ describe("debugManager", () => {
292292
DebugManagerClass.instance = undefined;
293293
const _manager = new DebugManagerClass();
294294

295-
expect(console.log).toHaveBeenCalledWith(
296-
"💡 提示:使用 window.debugConsole.help() 查看使用说明"
297-
);
295+
expect(console.log).not.toHaveBeenCalled();
298296
});
299297
});

packages/runtime/src/internal/debugManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class DebugManager {
176176
this.debugType === "persistent" ? "持久模式" : "会话模式"
177177
})`
178178
);
179-
} else {
179+
} else if (process.env.NODE_ENV !== "test") {
180180
// eslint-disable-next-line no-console
181181
console.log("💡 提示:使用 window.debugConsole.help() 查看使用说明");
182182
}

0 commit comments

Comments
 (0)