Skip to content

Commit

Permalink
before all block restoration
Browse files Browse the repository at this point in the history
  • Loading branch information
rshen91 committed Sep 18, 2024
1 parent d6c13a2 commit 29a9551
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ describe('Dashboard App', () => {
const expandedPanelIdSpy = jest.spyOn(mockDashboard.expandedPanelId, 'next');
let mockHistory: MemoryHistory;
let historySpy: jest.SpyInstance;

beforeEach(() => {
beforeAll(() => {
mockHistory = createMemoryHistory();
historySpy = jest.spyOn(mockHistory, 'replace');

/**
* Mock the LazyDashboardRenderer component to avoid rendering the actual dashboard
* and hitting errors that aren't relevant
Expand All @@ -46,7 +44,9 @@ describe('Dashboard App', () => {

return <div>Test renderer</div>;
});
});

beforeEach(() => {
// reset the mock history calls per test
historySpy.mockClear();
// reset the expanded panel id between tests
Expand Down

0 comments on commit 29a9551

Please sign in to comment.