UNPKG

@snowplow/javascript-tracker

Version:
36 lines (29 loc) 1.83 kB
Invoking: jest test/unit/*.test.ts --no-cache console.error Snowplow: Tracker callback failed caught error 65 | const logMsg = label + message + '\n'; 66 | if (error) { > 67 | console.error(logMsg + '\n', error, ...extraParams); | ^ 68 | } else { 69 | console.error(logMsg, ...extraParams); 70 | } at Object.error (../../libraries/tracker-core/src/logger.ts:67:22) at Object.applyAsyncFunction [as push] (src/in_queue.ts:270:15) at test/unit/in_queue.test.ts:155:18 at Object.<anonymous> (../../common/temp/node_modules/.pnpm/expect@26.6.2/node_modules/expect/build/toThrowMatchers.js:83:11) at Object.throwingMatcher [as toThrow] (../../common/temp/node_modules/.pnpm/expect@26.6.2/node_modules/expect/build/index.js:338:21) at Object.<anonymous> (test/unit/in_queue.test.ts:160:12) PASS test/unit/in_queue.test.ts (5.652s) InQueueManager Make a proxy, Function originally stored in asyncQueue is executed when asyncQueue becomes an AsyncQueueProxy (3ms) Add to asyncQueue after conversion, Function added to asyncQueue after it becomes an AsyncQueueProxy is executed Backward compatibility: Create a tracker using the legacy setCollectorUrl method, A second tracker is created and both trackers' attributes are added to output (1ms) Use 'function:tracker1;tracker2' syntax to control which trackers execute which functions, Set the attributes of the two trackers individually, then add both to output (1ms) Execute a user-defined custom callback (1ms) Executing a custom callback that errors should not throw (59ms) Test Suites: 1 passed, 1 total Tests: 6 passed, 6 total Snapshots: 0 total Time: 6.455s