From fcd6e966c7b618488f52f89ee6d6019015cb9738 Mon Sep 17 00:00:00 2001 From: qiqi Date: Fri, 4 Dec 2026 16:22:03 +0800 Subject: [PATCH] =?UTF-8?q?test(storage):=20=E5=86=99=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E6=B3=A8=E5=85=A5=E6=94=B9=E4=B8=BA=E8=B7=AF=E5=BE=84=E5=88=86?= =?UTF-8?q?=E9=9A=94=E7=AC=A6=E6=97=A0=E5=85=B3=EF=BC=88Windows=20?= =?UTF-8?q?=E5=8F=8D=E6=96=9C=E6=9D=A0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/storage-flush-persist-test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/storage-flush-persist-test.js b/tests/storage-flush-persist-test.js index a7e9aaf..8dbf89c 100644 --- a/tests/storage-flush-persist-test.js +++ b/tests/storage-flush-persist-test.js @@ -114,7 +114,8 @@ const boot = async () => { assert.ok(!/mem\['iwb_web_outputs'\]\s*=\s*JSON\.stringify/.test(SRC), '⑤ 维护路径应经 storage.setItem 标脏,不能直写 mem 后 flush') // ⑤ 写失败:失败的键必须回填脏集合并限次重试(不能一次失败就永久丢) - failRe = /canvases\// + // 路径分隔符无关:Windows 下 path.join 产出反斜杠,只匹配 '/' 会注入不到失败(2026-12-05 work 实测) + failRe = /canvases[\\/]/ const WS3 = WS2.replace('hello-edited', 'hello-retry') F2.storage().setItem('iwb_ws_ws1', WS3) const failed = await F2.flush()