From fe2819ca82c7e382cb03886ae49fb23efbd95129 Mon Sep 17 00:00:00 2001 From: Kasra Bigdeli Date: Sun, 19 Jul 2026 15:03:14 -0700 Subject: [PATCH] Test bulk deletion missing-app validation --- tests/AppDeletion.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/AppDeletion.test.ts diff --git a/tests/AppDeletion.test.ts b/tests/AppDeletion.test.ts new file mode 100644 index 0000000..4635df5 --- /dev/null +++ b/tests/AppDeletion.test.ts @@ -0,0 +1,13 @@ +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.' + ) + }) +})