Write tests for all submodules

Created on 10 December 2024, about 2 months ago

Problem/Motivation

Write tests for all submodules

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code (posthog)

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Anybody
  • 🇩🇪Germany Anybody Porta Westfalica

    Let's do this later. Definitely useful, but for example we'll have to mock the SDK.

  • 🇩🇪Germany Anybody Porta Westfalica

    @grevil: As long as you're "in" the module, could you write a short list, which tests might make sense here and how?

    I think we'd need to mock the SDK, that should make it easy to track most of the functionality. I think this would be a great learning for us. Still minor.

  • 🇩🇪Germany Grevil

    Sure!

    We need:
    Kernel Tests for the PHP SDK
    Simple javascript test, that the posthog js is loaded
    Tests for the alter hook (if possible)

    I think the other submodules are not easily testable, Maybe we could somehow "snatch" the event parameters send to posthog, but I am unsure, whether this is easily done.

Production build 0.71.5 2024