Expose process counter in a better way
This commit is contained in:
parent
d0d6fea204
commit
0c5e13b303
3 changed files with 5 additions and 9 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,10 +39,6 @@ namespace Smith {
|
|||
* @throws
|
||||
*/
|
||||
pPut(data: GunT.ValidDataValue): Promise<void>
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
_getProcCounter(): number
|
||||
}
|
||||
|
||||
export type UserSmithNode = GunSmithNode & GunT.UserGUNNode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue