Currently, in __tests__/utils.test.ts, here the way to mock the config data and test the functions getSearchableFields in every tests:
test('return list with one field', () => {
restoreEnv = mockedEnv({ ...environment, SEARCHABLE_FIELDS: 'field' })
const util = require('../src/util')
mockGetSearchableFields = util.getSearchableFields()
expect(mockGetSearchableFields).toMatchObject(['field'])
})
It would be better to be able to mock the config just once and not in every test.