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:
parent
103e2036c8
commit
c62172a58d
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue