From fd06cb138f359d2cfe7045453d34863a4ccaeb62 Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Wed, 18 Dec 2024 03:28:25 -0600 Subject: [PATCH] Tests for sequence over timestamp --- ...mp.spec.ts => Diviner.payloadPointer.sequence.spec.ts} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename packages/modules/packages/diviner/packages/payloadpointer/packages/memory/src/spec/{Diviner.payloadPointer.timestamp.spec.ts => Diviner.payloadPointer.sequence.spec.ts} (92%) diff --git a/packages/modules/packages/diviner/packages/payloadpointer/packages/memory/src/spec/Diviner.payloadPointer.timestamp.spec.ts b/packages/modules/packages/diviner/packages/payloadpointer/packages/memory/src/spec/Diviner.payloadPointer.sequence.spec.ts similarity index 92% rename from packages/modules/packages/diviner/packages/payloadpointer/packages/memory/src/spec/Diviner.payloadPointer.timestamp.spec.ts rename to packages/modules/packages/diviner/packages/payloadpointer/packages/memory/src/spec/Diviner.payloadPointer.sequence.spec.ts index 4f2a461b6b..5783bdd5d8 100644 --- a/packages/modules/packages/diviner/packages/payloadpointer/packages/memory/src/spec/Diviner.payloadPointer.timestamp.spec.ts +++ b/packages/modules/packages/diviner/packages/payloadpointer/packages/memory/src/spec/Diviner.payloadPointer.sequence.spec.ts @@ -7,7 +7,7 @@ import { Account } from '@xyo-network/account' import type { ArchivistInstance } from '@xyo-network/archivist-model' import type { NodeInstance } from '@xyo-network/node-model' import { PayloadBuilder } from '@xyo-network/payload-builder' -import type { Payload } from '@xyo-network/payload-model' +import { type Payload, SequenceConstants } from '@xyo-network/payload-model' import { beforeAll, describe, expect, it, @@ -25,7 +25,7 @@ import { } from './testUtil/index.ts' describe('PayloadPointerDiviner', () => { - describe('with rules for [timestamp]', () => { + describe('with rules for [sequence]', () => { let account: AccountInstance let payloads: Payload[] let expectedSchema: string @@ -69,8 +69,8 @@ describe('PayloadPointerDiviner', () => { const result = await sut.divine([pointer]) expect(PayloadBuilder.omitStorageMeta(result)).toEqual([expected]) }) - it('no matching timestamp', async () => { - const pointer = createPointer([[account.address]], [[expectedSchema]], 'asc') + it('no matching sequence', async () => { + const pointer = createPointer([[account.address]], [[expectedSchema]], 'asc', SequenceConstants.maxLocalSequence) const result = await sut.divine([pointer]) expect(result).toEqual([]) })