From d77606c6f877e8b17166e85f3f2b97712e3b2814 Mon Sep 17 00:00:00 2001 From: Garfield Date: Wed, 2 Dec 2026 10:54:18 +0800 Subject: [PATCH] =?UTF-8?q?:white=5Fcheck=5Fmark:=20(tests):=20=E8=B7=9F?= =?UTF-8?q?=E8=BF=9B=E6=9C=88=E8=AF=BB=E4=BC=9A=E8=AF=9D=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E8=BF=87=E6=9C=9F=E7=9A=84=E7=AC=94?= =?UTF-8?q?=E8=AE=B0=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/weread/core/note_mutate_spec.lua | 4 +++- tests/weread/core/note_sync_spec.lua | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/weread/core/note_mutate_spec.lua b/tests/weread/core/note_mutate_spec.lua index a14be45..7aa1059 100644 --- a/tests/weread/core/note_mutate_spec.lua +++ b/tests/weread/core/note_mutate_spec.lua @@ -47,7 +47,9 @@ live.doc_settings = { } package.loaded["apps/reader/readerui"] = { instance = live } package.loaded["reader.session"] = { - _snapshot = { identity = { source_id = "local", stable_id = "open-book", chapter_idx = 2 } }, + current = function() + return { identity = { source_id = "local", stable_id = "open-book", chapter_idx = 2 } } + end, } local wechat_notes = require("moonsource_weread.notes") diff --git a/tests/weread/core/note_sync_spec.lua b/tests/weread/core/note_sync_spec.lua index 7352727..9ccce26 100644 --- a/tests/weread/core/note_sync_spec.lua +++ b/tests/weread/core/note_sync_spec.lua @@ -438,10 +438,6 @@ do source_id = "authoritative", stable_id = "book.epub", chapter_idx = 3, source = authoritative, }), 0) - Assert.eq(SessionNote.applyLocal({ doc_settings = ui3.doc_settings }, { - source_id = "authoritative", stable_id = "book.epub", chapter_idx = 2, - source = authoritative, - }), 0, "没有打开文档时不应用") end -- 上传窗口内用户又划了线:不能用上传时那份快照 + 旧修订号覆盖回去。