Skip to content

Commit

Permalink
await until initialized in test
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomThomson committed Dec 7, 2022
1 parent 7537d74 commit f867a8e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
import { act } from 'react-dom/test-utils';
import { pluginServices } from '../services/plugin_services';

describe('LibraryNotificationPopover', () => {
describe('filters notification popover', () => {
const mockEmbeddableFactory = new ContactCardEmbeddableFactory((() => null) as any, {} as any);
pluginServices.getServices().embeddable.getEmbeddableFactory = jest
.fn()
Expand All @@ -41,6 +41,7 @@ describe('LibraryNotificationPopover', () => {

beforeEach(async () => {
container = new DashboardContainer(getSampleDashboardInput());
await container.untilInitialized();
const contactCardEmbeddable = await container.addNewEmbeddable<
ContactCardEmbeddableInput,
ContactCardEmbeddableOutput,
Expand Down

0 comments on commit f867a8e

Please sign in to comment.