Skip to content

Commit 0e97838

Browse files
committed
beacon
1 parent bc45abd commit 0e97838

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

lib/event_processor/event_processor_factory.browser.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import { LocalStorageCache } from '../utils/cache/local_storage_cache.browser';
4848
import { SyncPrefixCache } from '../utils/cache/cache';
4949
import { createForwardingEventProcessor, createBatchEventProcessor } from './event_processor_factory.browser';
5050
import { EVENT_STORE_PREFIX, FAILED_EVENT_RETRY_INTERVAL } from './event_processor_factory';
51-
import sendBeaconEventDispatcher from '../plugins/event_dispatcher/send_beacon_dispatcher';
51+
import sendBeaconEventDispatcher from './send_beacon_dispatcher.browser';
5252
import { getForwardingEventProcessor } from './forwarding_event_processor';
5353
import browserDefaultEventDispatcher from './default_dispatcher.browser';
5454
import { getBatchEventProcessor } from './event_processor_factory';

lib/event_processor/event_processor_factory.browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { EventProcessor } from './event_processor';
2020
import { EventWithId } from './batch_event_processor';
2121
import { getBatchEventProcessor, BatchEventProcessorOptions } from './event_processor_factory';
2222
import defaultEventDispatcher from './default_dispatcher.browser';
23-
import sendBeaconEventDispatcher from '../plugins/event_dispatcher/send_beacon_dispatcher';
23+
import sendBeaconEventDispatcher from './send_beacon_dispatcher.browser';
2424
import { LocalStorageCache } from '../utils/cache/local_storage_cache.browser';
2525
import { SyncPrefixCache } from '../utils/cache/cache';
2626
import { EVENT_STORE_PREFIX, FAILED_EVENT_RETRY_INTERVAL } from './event_processor_factory';

tests/sendBeaconDispatcher.spec.ts renamed to lib/event_processor/send_beacon_dispatcher.browser.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
import { describe, beforeEach, it, expect, vi, MockInstance } from 'vitest';
1717

18-
import sendBeaconDispatcher, { Event } from '../lib/plugins/event_dispatcher/send_beacon_dispatcher';
18+
import sendBeaconDispatcher, { Event } from './send_beacon_dispatcher.browser';
1919

2020
describe('dispatchEvent', function() {
2121
let sendBeaconSpy: MockInstance<typeof navigator.sendBeacon>;
@@ -26,8 +26,8 @@ describe('dispatchEvent', function() {
2626
});
2727

2828
it('should call sendBeacon with correct url, data and type', async () => {
29-
var eventParams = { testParam: 'testParamValue' };
30-
var eventObj: Event = {
29+
const eventParams = { testParam: 'testParamValue' };
30+
const eventObj: Event = {
3131
url: 'https://cdn.com/event',
3232
httpVerb: 'POST',
3333
params: eventParams,

lib/plugins/event_dispatcher/send_beacon_dispatcher.ts renamed to lib/event_processor/send_beacon_dispatcher.browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { EventDispatcher, EventDispatcherResponse } from '../../event_processor/event_dispatcher';
17+
import { EventDispatcher, EventDispatcherResponse } from './event_dispatcher';
1818

1919
export type Event = {
2020
url: string;

lib/index.browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { getLogger, setErrorHandler, getErrorHandler, LogLevel } from './modules
1919
import configValidator from './utils/config_validator';
2020
import defaultErrorHandler from './plugins/error_handler';
2121
import defaultEventDispatcher from './event_processor/default_dispatcher.browser';
22-
import sendBeaconEventDispatcher from './plugins/event_dispatcher/send_beacon_dispatcher';
22+
import sendBeaconEventDispatcher from './event_processor/send_beacon_dispatcher.browser';
2323
import * as enums from './utils/enums';
2424
import * as loggerPlugin from './plugins/logger';
2525
import { createNotificationCenter } from './core/notification_center';

0 commit comments

Comments
 (0)