added tests to createPlugin, plus minor refactors

Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Johan Haals <johan.haals@gmail.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-08-30 14:57:38 +02:00
parent 65c7c64666
commit 9758240395
14 changed files with 394 additions and 45 deletions
+3 -3
View File
@@ -43,7 +43,7 @@ export function createApp(options: { plugins: BackstagePlugin[] }): {
// apply config to adjust default extension instances and add more
const extensionParams = mergeExtensionParameters(
[
...options.plugins.flatMap(plugin => plugin.defaultExtensions),
...options.plugins.flatMap(plugin => plugin.extensions),
...builtinExtensions,
],
readAppExtensionParameters(appConfig),
@@ -116,8 +116,8 @@ export function createApp(options: { plugins: BackstagePlugin[] }): {
);
return (
<>
{rootComponents.map(Component => (
<Component />
{rootComponents.map((Component, i) => (
<Component key={i} />
))}
</>
);
+1 -1
View File
@@ -15,7 +15,7 @@
*/
/**
* TODO
* Core API used by Backstage frontend apps.
*
* @packageDocumentation
*/