"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.subscriptions = exports.identifySubscription = exports.trackSubscription = exports.mockWorkerAndXMLHttpRequest = void 0;
class WorkerStub {
    constructor(stringUrl) {
        this.url = stringUrl;
        this.onmessage = (_arg) => { };
    }
    postMessage(msg) {
        this.onmessage(msg);
    }
    addEventListener() { }
}
function mockWorkerAndXMLHttpRequest() {
    window.XMLHttpRequest = jest.fn();
    window.Worker = WorkerStub;
}
exports.mockWorkerAndXMLHttpRequest = mockWorkerAndXMLHttpRequest;
exports.trackSubscription = {
    partnerAction: 'track',
    name: 'Track',
    enabled: true,
    subscribe: 'type = "track"',
    mapping: {
        name: {
            '@path': '$.name'
        },
        properties: {
            '@path': '$.properties'
        }
    }
};
exports.identifySubscription = {
    partnerAction: 'identify',
    name: 'Identify',
    enabled: true,
    subscribe: 'type = "identify"',
    mapping: {
        userId: {
            '@path': '$.userId'
        },
        traits: {
            '@path': '$.traits'
        }
    }
};
exports.subscriptions = [exports.trackSubscription, exports.identifySubscription];
//# sourceMappingURL=test_utilities.js.map