fix(test): manually increase timeout to avoid document being closed early

This commit is contained in:
Josh 2022-10-04 08:45:36 +01:00
parent e84eb506b8
commit cbad2f0acf
2 changed files with 17 additions and 0 deletions

View File

@ -25,6 +25,21 @@ const App = (
);
describe('<ColorPickerInput />', () => {
/**
* We do this because
* https://github.com/facebook/jest/issues/12670
*/
beforeAll(() => {
jest.setTimeout(30000);
});
/**
* Reset timeout to what is expected
*/
afterAll(() => {
jest.setTimeout(5000);
});
it('renders and matches the snapshot', () => {
const { container } = render(App);

View File

@ -3,6 +3,8 @@
const baseConfig = require('../../../jest.base-config.front');
const pkg = require('./package.json');
console.log('BASE', baseConfig);
module.exports = {
...baseConfig,
displayName: (pkg.strapi && pkg.strapi.name) || pkg.name,