avoid overusing fancy constructs
Signed-off-by: Erik Larsson <erik.larsson@schibsted.com>
This commit is contained in:
@@ -84,10 +84,13 @@ describe('catalog:register', () => {
|
||||
catalogInfoUrl: 'http://foo/var',
|
||||
},
|
||||
});
|
||||
expect(addLocation).toBeCalledWith({
|
||||
type: 'url',
|
||||
target: 'http://foo/var',
|
||||
});
|
||||
expect(addLocation).toBeCalledWith(
|
||||
{
|
||||
type: 'url',
|
||||
target: 'http://foo/var',
|
||||
},
|
||||
{},
|
||||
);
|
||||
|
||||
expect(mockContext.output).toBeCalledWith(
|
||||
'entityRef',
|
||||
|
||||
@@ -100,7 +100,7 @@ export function createCatalogRegisterAction(options: {
|
||||
type: 'url',
|
||||
target: catalogInfoUrl,
|
||||
},
|
||||
...(ctx.token ? [{ token: ctx.token }] : []),
|
||||
ctx.token ? { token: ctx.token } : {},
|
||||
);
|
||||
if (result.entities.length >= 1) {
|
||||
const { kind, name, namespace } = getEntityName(result.entities[0]);
|
||||
|
||||
Reference in New Issue
Block a user