mirror of
https://github.com/caprover/caprover
synced 2026-08-24 00:16:37 +00:00
20 lines
733 B
TypeScript
20 lines
733 B
TypeScript
import { ensureAppsExist } from '../src/routes/user/apps/appdefinition/AppDefinitionRouter'
|
|
|
|
describe('app deletion', () => {
|
|
test('rejects the entire request when any requested app is missing', () => {
|
|
expect(() =>
|
|
ensureAppsExist(['existing-app', 'missing-app'], {
|
|
'existing-app': {},
|
|
})
|
|
).toThrow(
|
|
'App (missing-app) could not be found. Make sure that you have created the app.'
|
|
)
|
|
})
|
|
|
|
test('does not treat inherited object properties as existing apps', () => {
|
|
expect(() => ensureAppsExist(['constructor'], {})).toThrow(
|
|
'App (constructor) could not be found. Make sure that you have created the app.'
|
|
)
|
|
})
|
|
})
|