mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 08:52:26 +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 {
|
||||
uid: component.uid,
|
||||
category: component.categoru,
|
||||
category: component.category,
|
||||
...configuration,
|
||||
};
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user