Skip to content

Commit

Permalink
update mock usage per feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Jun 26, 2023
1 parent 0b3aea3 commit 4bbd5e1
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const createResult = (result: Result): GlobalSearchResult => {
const createBatch = (...results: Result[]): GlobalSearchBatchedResults => ({
results: results.map(createResult),
});
jest.useFakeTimers({ legacyFakeTimers: true });

describe('SearchBar', () => {
const usageCollection = usageCollectionPluginMock.createSetupContract();
Expand All @@ -59,6 +58,14 @@ describe('SearchBar', () => {
let eventReporter: EventReporter;
let chromeStyle$ = of<ChromeStyle>('classic');

beforeAll(() => {
jest.useFakeTimers();
});

afterAll(() => {
jest.useRealTimers();
});

beforeEach(() => {
applications = applicationServiceMock.createStartContract();
searchService = globalSearchPluginMock.createStartContract();
Expand Down

0 comments on commit 4bbd5e1

Please sign in to comment.