mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
* feat(self-host): add capability-aware setup * fix(self-host): preserve capability compatibility * fix(copilot): honor preview availability server-side * improvement(self-host): centralize capability resolution * fix(self-host): preserve integration availability paths * fix(testing): align capability-aware config mocks * improvement(self-host): simplify capability setup configuration * fix(setup): preserve unowned storage overrides * fix(self-host): reconcile storage and allowlists * fix(integrations): preserve connect deep links
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import { describe, expect, it } from 'bun:test'
|
|
import {
|
|
isMissingDependencyError,
|
|
missingDependenciesMessage,
|
|
retrySetupCommand,
|
|
} from './launcher.ts'
|
|
|
|
describe('setup launcher', () => {
|
|
it('recognizes missing packages without masking application import errors', () => {
|
|
expect(
|
|
isMissingDependencyError({
|
|
code: 'ERR_MODULE_NOT_FOUND',
|
|
message: "Cannot find package '@clack/prompts' from '/repo/scripts/setup/prompter.ts'",
|
|
})
|
|
).toBe(true)
|
|
expect(
|
|
isMissingDependencyError({
|
|
code: 'ERR_MODULE_NOT_FOUND',
|
|
message: "Cannot find module './missing-application-file.ts'",
|
|
})
|
|
).toBe(false)
|
|
expect(isMissingDependencyError(new Error('Invalid setup configuration'))).toBe(false)
|
|
})
|
|
|
|
it('prints the install command and the public retry command', () => {
|
|
expect(retrySetupCommand(['setup', 'status'])).toBe('bun run setup status')
|
|
expect(retrySetupCommand(['doctor'])).toBe('bun run sim doctor')
|
|
expect(missingDependenciesMessage('bun run setup status')).toContain('Run: bun install')
|
|
expect(missingDependenciesMessage('bun run setup status')).toContain(
|
|
'Then retry: bun run setup status'
|
|
)
|
|
})
|
|
})
|