Documentation
    Preparing search index...

    Function createMockLinkService

    • Create the NAP-LINK mock. Validates the URL like a conformant shell and records every decision in mock.state().records.

      Parameters

      • options: MockLinkOptions = {}

        Scheme allowlist, blocked hosts, and shared mock options.

      Returns MockLinkService

      The link mock service.

      const link = createMockLinkService();
      link.handleMessage('w1', { type: 'link.open', id: 'l1', url: 'https://example.org/' }, send);
      // → { type: 'link.open.result', id: 'l1', status: 'opened' }