mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-21 21:05:09 +00:00
* feat: gate agent alpha UI behind capabilities * fix: provide chat session for non-alpha home * fix: gate agents page behind alpha * fix: enable alpha capabilities in development
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import { describe, expect, it } from 'bun:test'
|
|
import { resolveStaticFeatureSupport } from './capabilities'
|
|
|
|
describe('resolveStaticFeatureSupport', () => {
|
|
it('enables alpha-gated features automatically in development', () => {
|
|
expect(
|
|
resolveStaticFeatureSupport({
|
|
isDevelopment: true,
|
|
alphaFeaturesEnabled: false,
|
|
requiresAlphaFlag: true,
|
|
}),
|
|
).toBe(true)
|
|
})
|
|
|
|
it('enables alpha-gated features only when explicitly opted in', () => {
|
|
expect(
|
|
resolveStaticFeatureSupport({
|
|
isDevelopment: false,
|
|
alphaFeaturesEnabled: true,
|
|
requiresAlphaFlag: true,
|
|
}),
|
|
).toBe(true)
|
|
})
|
|
|
|
it('keeps non-alpha features enabled in development', () => {
|
|
expect(
|
|
resolveStaticFeatureSupport({
|
|
isDevelopment: true,
|
|
alphaFeaturesEnabled: false,
|
|
}),
|
|
).toBe(true)
|
|
})
|
|
|
|
it('leaves non-alpha features unresolved in production', () => {
|
|
expect(
|
|
resolveStaticFeatureSupport({
|
|
isDevelopment: false,
|
|
alphaFeaturesEnabled: false,
|
|
}),
|
|
).toBeNull()
|
|
})
|
|
})
|