Skip to content

Commit

Permalink
test: rename CoreManager test helper function name and args
Browse files Browse the repository at this point in the history
This is just a simple rename for clarity. See [this comment][0].

[0]: #783 (review)
  • Loading branch information
EvanHahn committed Aug 28, 2024
1 parent 519169d commit 71b1bf0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/helpers/core-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ const destroyStream = (stream) =>
})

/**
* @param {CoreManager} cmToAdd
* @param {CoreManager} cmToTakeFrom
* @param {CoreManager} cmToReceive
* @returns {Promise<void>}
*/
async function addWriterCores(cmToAdd, cmToReceive) {
await cmToAdd.ready()
async function takeWriterCores(cmToTakeFrom, cmToReceive) {
await cmToTakeFrom.ready()
for (const ns of NAMESPACES) {
if (ns === 'auth') continue
const core = cmToAdd.getWriterCore(ns)
const core = cmToTakeFrom.getWriterCore(ns)
cmToReceive.addCore(core.key, ns)
}
}
Expand Down Expand Up @@ -95,8 +95,8 @@ export function replicate(
cm1[kCoreManagerReplicate](n1)
cm2[kCoreManagerReplicate](n2)

addWriterCores(cm1, cm2)
addWriterCores(cm2, cm1)
takeWriterCores(cm1, cm2)
takeWriterCores(cm2, cm1)

return {
async destroy() {
Expand Down

0 comments on commit 71b1bf0

Please sign in to comment.