Files
Dungeons-Ground/packages/shared/src/index.test.ts
pavel444-byte 438e5af0ad
Some checks failed
CI / validate (push) Failing after 9m21s
Important Fixes, New mechanics, and many more
2026-08-15 17:37:57 +05:00

20 lines
698 B
TypeScript

import { describe, expect, it } from 'vitest'
import { PlayerIntentSchema } from './index'
describe('shared database contracts', () => {
it('accepts PostgREST timestamptz values with an explicit UTC offset', () => {
const intent = PlayerIntentSchema.parse({
id: '2c321216-ef17-48a2-9aa3-6250bb4354f5',
roundId: '940fc00f-76e1-45dc-b401-55a2084e3e0e',
memberId: '85701d65-0b2c-4c7e-aa30-d67fc77f1f54',
characterId: 'bfc4b38f-bf3c-4ee1-b875-aa98b2b3a756',
action: 'Inspect the access panel.',
ready: true,
createdAt: '2026-08-15T08:42:10.123456+00:00',
updatedAt: '2026-08-15T08:42:11+00:00',
})
expect(intent.ready).toBe(true)
})
})