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 -- 上传窗口内用户又划了线:不能用上传时那份快照 + 旧修订号覆盖回去。