test: update all specs for Store instance API

Problem: every spec used the old singleton API (store.unload(),
store.load(), store.add(), etc.) and diff.apply(lines, hidden).

Solution: lower-level specs (store, diff, views, complete, file) use
s = store.new(path); s:load() directly. Higher-level specs (archive,
edit, filter, status, sync) reset package.loaded['pending'] in
before_each and use pending.store() to access the live instance.
diff.apply calls updated to diff.apply(lines, s, hidden_ids).
This commit is contained in:
Barrett Ruth 2026-02-26 20:00:49 -05:00 committed by Barrett Ruth
parent 103e2036c8
commit c62172a58d

View file

@ -3,6 +3,7 @@ require('spec.helpers')
local buffer = require('pending.buffer')
local config = require('pending.config')
local store = require('pending.store')
local buffer = require('pending.buffer')
describe('complete', function()
local tmpdir