feat(swarm): modify unified-shell to render swarm layout

This commit is contained in:
zenchantlive 2026-02-20 17:25:05 -08:00
parent b721073585
commit 654f73f83d
6 changed files with 13 additions and 5 deletions

View file

@ -1,3 +1,4 @@
// @ts-ignore
import { expect, test, describe, mock } from 'bun:test';
// Mock the hook that the component tries to import
@ -7,6 +8,7 @@ mock.module('@/hooks/use-url-state', () => ({
describe('SwarmMissionPicker Component', () => {
test('exports SwarmMissionPicker component that is a function', async () => {
// @ts-ignore
const mod = await import('../../../src/components/swarm/swarm-mission-picker');
expect(mod.SwarmMissionPicker).toBeDefined();
expect(typeof mod.SwarmMissionPicker).toBe('function');

View file

@ -1,8 +1,9 @@
// @ts-ignore
import { expect, test, describe } from 'bun:test';
describe('SwarmWorkspace Component', () => {
test('exports SwarmWorkspace component that is a function', async () => {
// This will fail because the file doesn't exist yet
// @ts-ignore
const mod = await import('../../../src/components/swarm/swarm-workspace');
expect(mod.SwarmWorkspace).toBeDefined();
expect(typeof mod.SwarmWorkspace).toBe('function');

View file

@ -1,6 +1,6 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';
// We'll use bun test to add a specific rendering test
// @ts-ignore
import { expect, test as bunTest } from 'bun:test';
describe('UnifiedShell Component Contract', () => {
@ -27,7 +27,7 @@ describe('UnifiedShell Component Contract', () => {
bunTest('UnifiedShell handles swarm view conditionally', async () => {
const mod = await import('../../src/components/shared/unified-shell');
const UnifiedShell = mod.UnifiedShell;
const _UnifiedShell = mod.UnifiedShell;
// Create a minimal mock state to just render the function
// We mock out the hooks if we can, but since this is a Server Component or uses context, it might be tricky.