mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
fix(content-manager): typo when returning a component category
This commit is contained in:
parent
5c9a88be04
commit
5925ace19a
@ -0,0 +1,28 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const componentsService = require('../components');
|
||||||
|
|
||||||
|
const configuration = {
|
||||||
|
test: 'value',
|
||||||
|
some: 'config',
|
||||||
|
};
|
||||||
|
|
||||||
|
jest.mock('../configuration', () =>
|
||||||
|
jest.fn(() => ({
|
||||||
|
getConfiguration: jest.fn(() => configuration),
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
|
||||||
|
describe('componentService', () => {
|
||||||
|
test('findComponent', async () => {
|
||||||
|
const { findConfiguration } = componentsService({});
|
||||||
|
|
||||||
|
const component = {
|
||||||
|
uid: 'blog.test-compo',
|
||||||
|
category: 'blog',
|
||||||
|
};
|
||||||
|
const result = await findConfiguration(component);
|
||||||
|
|
||||||
|
expect(result).toEqual({ ...component, ...configuration });
|
||||||
|
});
|
||||||
|
});
|
@ -41,7 +41,7 @@ module.exports = ({ strapi }) => ({
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
uid: component.uid,
|
uid: component.uid,
|
||||||
category: component.categoru,
|
category: component.category,
|
||||||
...configuration,
|
...configuration,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user