frontend-app-api: fixes to make sure all inputs are declared

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-10-10 10:15:00 +02:00
parent 68ffb9e67d
commit 0472294b0c
3 changed files with 12 additions and 1 deletions
@@ -27,6 +27,9 @@ export const Core = createExtension({
apis: createExtensionInput({
api: coreExtensionData.apiFactory,
}),
themes: createExtensionInput({
theme: coreExtensionData.theme,
}),
},
output: {},
factory() {},
@@ -48,7 +48,7 @@ function createTestExtension(options: {
id: options.id,
attachTo: options.parent
? { id: options.parent, input: 'children' }
: { id: 'core.routes', input: 'children' },
: { id: 'core.routes', input: 'routes' },
output: {
element: coreExtensionData.reactElement,
path: coreExtensionData.routePath.optional(),
@@ -305,6 +305,7 @@ describe('discovery', () => {
}),
createTestExtension({
id: 'fooEmpty',
parent: 'foo',
}),
createTestExtension({
id: 'page3',
@@ -16,6 +16,7 @@
import {
createExtension,
createExtensionInput,
createPageExtension,
createPlugin,
createThemeExtension,
@@ -143,6 +144,9 @@ describe('createApp', () => {
extension: createExtension({
id: 'root',
attachTo: { id: '', input: '' },
inputs: {
children: createExtensionInput({}),
},
output: {},
factory() {},
}),
@@ -181,6 +185,9 @@ describe('createApp', () => {
extension: createExtension({
id: 'root',
attachTo: { id: '', input: '' },
inputs: {
children: createExtensionInput({}),
},
output: {},
factory() {},
}),