Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit 1a2da94

Browse files
fix: broken tests
1 parent 7591bfe commit 1a2da94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

assets/js/__tests__/utils/style.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/* eslint-disable no-magic-numbers */
22
import { addStyleHelper, applyStyles, addStyle } from '../../src/gutenberg/utils/style';
3+
import { Helpers } from '../../src/gutenberg/wrapper';
4+
5+
jest.mock('../../src/gutenberg/wrapper');
36

47
beforeEach(() => {
58
markerAnimationParams.addedStyle = {};
@@ -85,6 +88,7 @@ describe('addStyleHelper', () => {
8588

8689
describe('applyStyles', () => {
8790
it('should setup styles', () => {
91+
jest.spyOn(Helpers, 'editorReady').mockImplementation((callback) => callback());
8892
applyStyles();
8993
applyStyles();
9094
window.document.dispatchEvent(new Event('DOMContentLoaded', {

0 commit comments

Comments
 (0)