test(storage): 写失败注入改为路径分隔符无关(Windows 反斜杠)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m0s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m0s
This commit is contained in:
1 parent
dd0850f721
commit
fcd6e966c7
1 file changed
+2
-1
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user