Expose process counter in a better way

This commit is contained in:
Daniel Lugo 2021-09-23 11:17:14 -04:00
parent d0d6fea204
commit 0c5e13b303
3 changed files with 5 additions and 9 deletions

View file

@ -628,9 +628,6 @@ function createReplica(path, afterMap = false) {
}
})
})
},
_getProcCounter() {
return procCounter
}
}
}
@ -765,3 +762,6 @@ module.exports.kill = () => {
module.exports._reforge = forge
module.exports._isReady = isReady
module.exports._getProcCounter = () => {
return procCounter
}

View file

@ -278,7 +278,7 @@ describe('gun smith', () => {
await whenReady()
jest.setTimeout(40000)
const initialProcCounter = instance._getProcCounter()
const initialProcCounter = Gun._getProcCounter()
const node = instance.get(words()).get(words())
@ -287,7 +287,7 @@ describe('gun smith', () => {
node.specialOn(
debounce(data => {
if (data === secondValue) {
expect(instance._getProcCounter()).toEqual(initialProcCounter + 1)
expect(Gun._getProcCounter()).toEqual(initialProcCounter + 1)
done()
release()
}

View file

@ -39,10 +39,6 @@ namespace Smith {
* @throws
*/
pPut(data: GunT.ValidDataValue): Promise<void>
/**
* @protected
*/
_getProcCounter(): number
}
export type UserSmithNode = GunSmithNode & GunT.UserGUNNode