Skip to content

Commit

Permalink
Tests for sequence over timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelBCarter committed Dec 18, 2024
1 parent 532e18f commit fd06cb1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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([])
})
Expand Down

0 comments on commit fd06cb1

Please sign in to comment.