[EBT] Remove unnecessary async from tests (#131500)

This commit is contained in:
Alejandro Fernández Haro 2022-05-04 13:44:16 +02:00 committed by GitHub
parent 876d65c479
commit 8271455691
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -316,7 +316,7 @@ describe('AnalyticsClient', () => {
test(
'Spreads the context updates to the shipper (only after opt-in)',
fakeSchedulers(async (advance) => {
fakeSchedulers((advance) => {
const extendContextMock = jest.fn();
analyticsClient.registerShipper(MockedShipper, { extendContextMock });
expect(extendContextMock).toHaveBeenCalledTimes(0); // Not until we have opt-in
@ -345,7 +345,7 @@ describe('AnalyticsClient', () => {
test(
'Does not spread the context if opt-in === false',
fakeSchedulers(async (advance) => {
fakeSchedulers((advance) => {
const extendContextMock = jest.fn();
analyticsClient.registerShipper(MockedShipper, { extendContextMock });
expect(extendContextMock).toHaveBeenCalledTimes(0); // Not until we have opt-in
@ -357,7 +357,7 @@ describe('AnalyticsClient', () => {
test(
'Handles errors in the shipper',
fakeSchedulers(async (advance) => {
fakeSchedulers((advance) => {
const extendContextMock = jest.fn().mockImplementation(() => {
throw new Error('Something went terribly wrong');
});