惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
I
InfoQ
Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
GbyAI
GbyAI
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
美团技术团队
罗磊的独立博客
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
M
MIT News - Artificial intelligence
D
Docker
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
博客园 - 叶小钗

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: use platform spy helper in cli tests · openclaw/ope...
vincentkoc · 2026-05-17 · via Recent Commits to openclaw:main

@@ -1,4 +1,5 @@

11

import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";

2+

import { withMockedPlatform } from "../test-utils/vitest-spies.js";

2334

const { spawnMock } = vi.hoisted(() => ({

45

spawnMock: vi.fn(),

@@ -28,18 +29,6 @@ function expectTaskkillCall(index: number, args: string[]) {

2829

]);

2930

}

303131-

async function withPlatform<T>(platform: NodeJS.Platform, run: () => Promise<T> | T): Promise<T> {

32-

const originalPlatform = Object.getOwnPropertyDescriptor(process, "platform");

33-

Object.defineProperty(process, "platform", { value: platform, configurable: true });

34-

try {

35-

return await run();

36-

} finally {

37-

if (originalPlatform) {

38-

Object.defineProperty(process, "platform", originalPlatform);

39-

}

40-

}

41-

}

42-4332

describe("killProcessTree", () => {

4433

let killSpy: ReturnType<typeof vi.spyOn>;

4534

@@ -67,7 +56,7 @@ describe("killProcessTree", () => {

6756

return true;

6857

}) as typeof process.kill);

695870-

await withPlatform("win32", async () => {

59+

await withMockedPlatform("win32", async () => {

7160

killProcessTree(4242, { graceMs: 25 });

72617362

expect(spawnMock).toHaveBeenCalledTimes(1);

@@ -86,7 +75,7 @@ describe("killProcessTree", () => {

8675

return true;

8776

}) as typeof process.kill);

887789-

await withPlatform("win32", async () => {

78+

await withMockedPlatform("win32", async () => {

9079

killProcessTree(5252, { graceMs: 10 });

91809281

await vi.advanceTimersByTimeAsync(10);

@@ -108,7 +97,7 @@ describe("killProcessTree", () => {

10897

return true;

10998

}) as typeof process.kill);

11099111-

await withPlatform("linux", async () => {

100+

await withMockedPlatform("linux", async () => {

112101

killProcessTree(3333, { graceMs: 10 });

113102114103

await vi.advanceTimersByTimeAsync(10);

@@ -127,7 +116,7 @@ describe("killProcessTree", () => {

127116

return true;

128117

}) as typeof process.kill);

129118130-

await withPlatform("linux", async () => {

119+

await withMockedPlatform("linux", async () => {

131120

killProcessTree(4444, { graceMs: 5 });

132121133122

await vi.advanceTimersByTimeAsync(5);

@@ -145,7 +134,7 @@ describe("killProcessTree", () => {

145134

return true;

146135

}) as typeof process.kill);

147136148-

await withPlatform("linux", async () => {

137+

await withMockedPlatform("linux", async () => {

149138

killProcessTree(5555, { graceMs: 10, detached: false });

150139

await vi.advanceTimersByTimeAsync(10);

151140

@@ -169,7 +158,7 @@ describe("killProcessTree", () => {

169158

return true;

170159

}) as typeof process.kill);

171160172-

await withPlatform("linux", async () => {

161+

await withMockedPlatform("linux", async () => {

173162

killProcessTree(6666, { graceMs: 10 });

174163

await vi.advanceTimersByTimeAsync(10);

175164