DATA-173 | Update Context so it can work on Mobile #26
Annotations
8 errors and 1 warning
Run tests:
lib/mixpanel/context.tsx#L51
TypeError: Cannot read properties of undefined (reading 'trackEvent')
❯ lib/mixpanel/context.tsx:51:25
❯ onClick test/mixpanel.test.tsx:95:21
❯ HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js:4164:14
❯ HTMLUnknownElement.callTheUserObjectsOperation node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30
❯ innerInvokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25
❯ invokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3
❯ HTMLUnknownElementImpl._dispatch node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9
❯ HTMLUnknownElementImpl.dispatchEvent node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17
❯ HTMLUnknownElement.dispatchEvent node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34
❯ Object.invokeGuardedCallbackDev node_modules/react-dom/cjs/react-dom.development.js:4213:16
This error originated in "test/mixpanel.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "trackEvent sends correct data to api client". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
|
Run tests:
lib/mixpanel/context.tsx#L51
TypeError: Cannot read properties of undefined (reading 'trackEvent')
❯ lib/mixpanel/context.tsx:51:25
❯ onClick test/mixpanel.test.tsx:95:21
❯ HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js:4164:14
❯ HTMLUnknownElement.callTheUserObjectsOperation node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30
❯ innerInvokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25
❯ invokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3
❯ HTMLUnknownElementImpl._dispatch node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9
❯ HTMLUnknownElementImpl.dispatchEvent node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17
❯ HTMLUnknownElement.dispatchEvent node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34
❯ Object.invokeGuardedCallbackDev node_modules/react-dom/cjs/react-dom.development.js:4213:16
This error originated in "test/mixpanel.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "provider can extend the default context for event tracking with provider prop". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
|
Run tests:
lib/mixpanel/context.tsx#L51
TypeError: Cannot read properties of undefined (reading 'trackEvent')
❯ lib/mixpanel/context.tsx:51:25
❯ onClick test/mixpanel.test.tsx:95:21
❯ HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js:4164:14
❯ HTMLUnknownElement.callTheUserObjectsOperation node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30
❯ innerInvokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25
❯ invokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3
❯ HTMLUnknownElementImpl._dispatch node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9
❯ HTMLUnknownElementImpl.dispatchEvent node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17
❯ HTMLUnknownElement.dispatchEvent node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34
❯ Object.invokeGuardedCallbackDev node_modules/react-dom/cjs/react-dom.development.js:4213:16
This error originated in "test/mixpanel.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "Default event context can be extended from a child component". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
|
Run tests:
test/mixpanel.test.tsx#L142
AssertionError: expected "spy" to be called with arguments: [ { name: 'event name', …(2) } ]
Received:
Number of calls: 0
❯ test/mixpanel.test.tsx:142:32
|
Run tests:
test/mixpanel.test.tsx#L171
AssertionError: expected "spy" to be called with arguments: [ { name: 'event name', …(2) } ]
Received:
Number of calls: 0
❯ test/mixpanel.test.tsx:171:32
|
Run tests:
test/mixpanel.test.tsx#L201
AssertionError: expected "spy" to be called with arguments: [ { name: 'event name', …(2) } ]
Received:
Number of calls: 0
❯ test/mixpanel.test.tsx:201:32
|
Run tests:
lib/mixpanel/context.tsx#L61
TypeError: Cannot read properties of undefined (reading 'trackPageView')
❯ lib/mixpanel/context.tsx:61:25
❯ test/mixpanel.test.tsx:111:13
❯ commitHookEffectListMount node_modules/react-dom/cjs/react-dom.development.js:23150:26
❯ commitPassiveMountOnFiber node_modules/react-dom/cjs/react-dom.development.js:24931:11
❯ commitPassiveMountEffects_complete node_modules/react-dom/cjs/react-dom.development.js:24891:9
❯ commitPassiveMountEffects_begin node_modules/react-dom/cjs/react-dom.development.js:24878:7
❯ commitPassiveMountEffects node_modules/react-dom/cjs/react-dom.development.js:24866:3
❯ flushPassiveEffectsImpl node_modules/react-dom/cjs/react-dom.development.js:27039:3
❯ flushPassiveEffects node_modules/react-dom/cjs/react-dom.development.js:26984:14
❯ commitRootImpl node_modules/react-dom/cjs/react-dom.development.js:26935:5
|
Run tests
Process completed with exit code 1.
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-node@v3, actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Loading