Skip to content

Commit

Permalink
move teardown to reopen
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Jun 28, 2024
1 parent deef45a commit 031af9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,13 +563,13 @@ async function create (t, opts = {}) {

if (!opts.discoveryKey) opts.discoveryKey = dkey

return Core.open(db, opts)
const core = await Core.open(db, opts)
t.teardown(() => core.close())
return core
}

const core = await reopen()

t.teardown(() => core.close())

return { core, reopen }
}

Expand Down

0 comments on commit 031af9a

Please sign in to comment.