This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

vit / test / ship-cap.test.js
825 B 19 lines
1// SPDX-License-Identifier: MIT 2// Copyright (c) 2026 sol pbc 3 4import { test, expect } from 'bun:test'; 5import { readFileSync } from 'node:fs'; 6import { join } from 'node:path'; 7 8test('shipCap traverses the shared cap publisher', () => { 9 const source = readFileSync(join(import.meta.dir, '..', 'src', 'cmd', 'ship.js'), 'utf-8'); 10 const shipCapStart = source.indexOf('export async function shipCap'); 11 const shipCapEnd = source.indexOf('export default function register'); 12 const shipCapBody = source.slice(shipCapStart, shipCapEnd); 13 14 expect(source).toContain("import { publishCap } from '../lib/cap.js';"); 15 expect(shipCapStart).toBeGreaterThan(-1); 16 expect(shipCapEnd).toBeGreaterThan(shipCapStart); 17 expect(shipCapBody).toContain('publishCap('); 18 expect(source.match(/putRecord\(/g) || []).toHaveLength(1); 19});