Files
AetherForge/server/web/src/help/spreadProfiles.test.ts
AetherForge a32860b0d9
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
feat: alive UI wave, galaxy presence, spread and fleet enhancements
Dashboard ambient layer, comrade presence, Mission Deck and War Room, Emberwake supply chain, spread/docs publishing, fleet policy and modules API, CI docker mining, and refreshed USB pack.
2026-06-04 22:36:17 -07:00

40 lines
1.2 KiB
TypeScript

import { describe, it, expect } from 'vitest';
import { SPREAD_PROFILES, applySpreadProfile } from './spreadProfiles';
import type { BuildRequest } from '../types';
const baseForm = (): BuildRequest =>
({
server_url: 'http://192.168.1.1:8989',
wallet: '4' + 'A'.repeat(94),
worker_name: 'test',
threads: 2,
target_os: 'windows',
target_arch: 'amd64',
}) as BuildRequest;
describe('spreadProfiles', () => {
it('exposes four colored presets', () => {
expect(SPREAD_PROFILES).toHaveLength(4);
expect(SPREAD_PROFILES.map((p) => p.label)).toEqual([
'Web Drop',
'Desktop Fusion',
'LAN Kindling',
'Crucible Ops',
]);
SPREAD_PROFILES.forEach((p) => expect(p.color).toMatch(/^#/));
});
it('applies LAN Kindling spread kit flags', () => {
const next = applySpreadProfile(baseForm(), 'lan_kindling');
expect(next.spread_kit).toBe(true);
expect(next.auto_spread).toBe(true);
expect(next.target_os).toBe('universal');
});
it('applies Crucible Ops aggressive remote', () => {
const next = applySpreadProfile(baseForm(), 'crucible_ops');
expect(next.remote_aggressive).toBe(true);
expect(next.hole_punch).toBe(true);
});
});