UNPKG

redux-beacon-matomo-tag-manager

Version:
35 lines 1.62 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var delay_1 = tslib_1.__importDefault(require("delay")); describe('matomo-tag-manager', function () { var consoleListener = jest.fn(); beforeAll(function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: page.on('console', function (msg) { return consoleListener(msg.text()); }); return [4 /*yield*/, page.goto('http://localhost:8080/')]; case 1: _a.sent(); return [4 /*yield*/, delay_1.default(1000)]; case 2: _a.sent(); return [2 /*return*/]; } }); }); }); it('activates the test trigger on initialization', function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { expect(consoleListener).toHaveBeenCalledWith('Tag manager loaded'); return [2 /*return*/]; }); }); }); it('triggers the integration test event on initialization', function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { expect(consoleListener).toHaveBeenCalledWith('Integration test event triggered'); return [2 /*return*/]; }); }); }); }); //# sourceMappingURL=matomo-tag-manager.int-spec.js.map