f9447f8e5f
CI / typecheck · build · test · bundle-size (push) Failing after 1s
CI / clean-room dependency closure smoke (push) Failing after 1s
CI / server-runtime e2e (docker · pg + valkey) (push) Failing after 2s
Deploy Install Scripts / deploy (push) Failing after 2s
Windows / build (push) Has been cancelled
18 lines
832 B
TypeScript
18 lines
832 B
TypeScript
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import { describe, it, expect } from 'bun:test';
|
|
import { normalizeRuntimeFlag } from '../../src/npx-cli/commands/server-runtime-setup.js';
|
|
|
|
describe('server-runtime-setup — install planning (#2543)', () => {
|
|
it('normalizeRuntimeFlag accepts worker/server/server-beta and the default', () => {
|
|
expect(normalizeRuntimeFlag(undefined)).toBe('worker');
|
|
expect(normalizeRuntimeFlag('')).toBe('worker');
|
|
expect(normalizeRuntimeFlag('worker')).toBe('worker');
|
|
expect(normalizeRuntimeFlag('server')).toBe('server');
|
|
// Phase 1d: legacy literal accepted, normalized to canonical 'server'.
|
|
expect(normalizeRuntimeFlag('server-beta')).toBe('server');
|
|
expect(normalizeRuntimeFlag('SERVER')).toBe('server');
|
|
expect(normalizeRuntimeFlag('bogus')).toBeNull();
|
|
});
|
|
});
|