import { assert, createLogicSuite } from '@genesislcap/foundation-testing';
import { resolveCostHistoryConfig } from './resolve-cost-history-config';
const Suite = createLogicSuite('resolveCostHistoryConfig');
Suite('defaults to disabled with cost UI visible', () => {
    const resolved = resolveCostHistoryConfig({});
    assert.is(resolved.enabled, false);
    assert.is(resolved.showCost, true);
    assert.is(resolved.showTokens, true);
    assert.is(resolved.badgeLabel, 'Currently building');
});
Suite('enables persistence only when costHistory.enabled is true', () => {
    assert.is(resolveCostHistoryConfig({ costHistory: {} }).enabled, false);
    assert.is(resolveCostHistoryConfig({ costHistory: { enabled: true } }).enabled, true);
});
Suite('reads costHistory fields', () => {
    const resolved = resolveCostHistoryConfig({
        costHistory: {
            enabled: true,
            title: 'My project',
            scope: 'app-scope',
            showCost: false,
            showTokens: false,
            badgeLabel: 'Building',
        },
    });
    assert.is(resolved.title, 'My project');
    assert.is(resolved.scope, 'app-scope');
    assert.is(resolved.showCost, false);
    assert.is(resolved.showTokens, false);
    assert.is(resolved.badgeLabel, 'Building');
});
Suite.run();
