fix: single types unit test

This commit is contained in:
Marc-Roig 2023-05-26 14:45:22 +02:00
parent 450b9fd7cf
commit 00b166d439
No known key found for this signature in database
GPG Key ID: FB4E2C43A0BEE249

View File

@ -3,6 +3,13 @@
const createContext = require('../../../../../../test/helpers/create-context');
const singleTypes = require('../single-types');
// Mock the populate functions
jest.mock('../../services/utils/populate', () => ({
...jest.requireActual('../../services/utils/populate'),
getDeepPopulate: () => ({}),
getQueryPopulate: async () => ({}),
}));
describe('Single Types', () => {
test('Successfull find', async () => {
const state = {
@ -36,6 +43,7 @@ describe('Single Types', () => {
},
},
},
getModel: jest.fn(),
plugins: {
'content-manager': {
services: {