Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

562 B
Raw Blame
import { shareLinkRequestSchema } from './share.schema';

import { describe, it, expect } from 'vitest';

describe('shareLinkRequestSchema', () => {
  it('accepts any subset of section toggles (all optional) and an empty body', () => {
    expect(shareLinkRequestSchema.safeParse({ share_map: true, share_budget: false }).success).toBe(true);
    expect(shareLinkRequestSchema.safeParse({}).success).toBe(true);
  });

  it('rejects a non-boolean toggle', () => {
    expect(shareLinkRequestSchema.safeParse({ share_map: 'yes' }).success).toBe(false);
  });
});