frontend-plugin-api: add tests for generator factories + error on undeclared output
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -914,7 +914,7 @@ describe('instantiateAppNodeTree', () => {
|
||||
namespace: 'app',
|
||||
name: 'test',
|
||||
attachTo: { id: 'ignored', input: 'ignored' },
|
||||
output: [],
|
||||
output: [testDataRef],
|
||||
factory() {
|
||||
const error = new Error('NOPE');
|
||||
error.name = 'NopeError';
|
||||
@@ -981,11 +981,12 @@ describe('instantiateAppNodeTree', () => {
|
||||
createAppNodeInstance({
|
||||
node: makeNode(
|
||||
resolveExtensionDefinition(
|
||||
// @ts-expect-error
|
||||
createExtension({
|
||||
namespace: 'app',
|
||||
name: 'test',
|
||||
attachTo: { id: 'ignored', input: 'ignored' },
|
||||
output: [],
|
||||
output: [], // Output not declared
|
||||
factory({}) {
|
||||
return [testDataRef('test')] as any;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user