UNPKG

@snowplow/javascript-tracker

Version:
37 lines (30 loc) 1.86 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:9) at Object.applyAsyncFunction [as push] (src/in_queue.ts:270:15) at test/unit/in_queue.test.ts:179:18 at Object.<anonymous> (../../common/temp/node_modules/.pnpm/expect@27.5.1/node_modules/expect/build/toThrowMatchers.js:83:11) at Object.throwingMatcher [as toThrow] (../../common/temp/node_modules/.pnpm/expect@27.5.1/node_modules/expect/build/index.js:382:21) at Object.<anonymous> (test/unit/in_queue.test.ts:184:12) PASS test/unit/in_queue.test.ts (5.374s) InQueueManager ✓ Make a proxy, Function originally stored in asyncQueue is executed when asyncQueue becomes an AsyncQueueProxy (7ms) ✓ Add to asyncQueue after conversion, Function added to asyncQueue after it becomes an AsyncQueueProxy is executed ✓ Set UserId to String, null and undefined (1ms) ✓ 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 ✓ Execute a user-defined custom callback ✓ Executing a custom callback that errors should not throw (105ms) Test Suites: 1 passed, 1 total Tests: 7 passed, 7 total Snapshots: 0 total Time: 6.5s