prebid / Prebid.js

Setup and manage header bidding advertising partners without writing code or confusing line items. Prebid.js is open source and free.
https://docs.prebid.org
Apache License 2.0
1.28k stars 2.06k forks source link

Karma Deprecation #10806

Open hemang-rajyaguru opened 9 months ago

hemang-rajyaguru commented 9 months ago

Question

Description

With Karma being deprecated: https://github.com/karma-runner/karma, is this something you are thinking about addressing? In terms of your technical roadmap around testing, are you planning on keeping the existing setup using mocha, chai etc? Curious as to what you think about using Jest.

patmmccann commented 9 months ago

We're not currently prioritizing this work; any reason to we might be unaware of?

hemang-rajyaguru commented 9 months ago

I'm curious because with karma and gulp also not being updated, I didn't want to go and raise a change without understanding what your focus was from a technical side. I am happy to contribute and help improve things but just wanted to know what your approach to dealing with these sorts of things when things get deprecated. So you have a technical roadmap? And are you open to alternative suggestions around the testing setup?

dgirardi commented 9 months ago

(This is my opinion and doesn't necessarily reflect the community's)

Since this only affects the build system (and not the codebase or artifacts) I see no rush in switching tools; as long as it works, there's no impact. I expect that some future version of node won't work well with outdated packages and that's when I personally would start to worry about modernizing - we'll still have the option of using the next-to-last node to run builds, so I don't see a scenario where we are too late in picking this up.

That said, contributions are always welcome, and in this case I think also likely to be uncontroversial and merged quickly, for the same reasons - I don't expect them to have much of an impact.

patmmccann commented 9 months ago

@dgirardi is too modest; his view does reflect the outcome of community discussions

patmmccann commented 9 months ago

I am happy to contribute and help improve things

🚀 💯

We'd welcome your contributions. Without this being contributed; I am afraid the issue backlog is quite deep and this might not get attention. Feel free to browse https://github.com/orgs/prebid/projects/2

hemang-rajyaguru commented 9 months ago

Thanks all.

Happy to look at this.

In terms of migrating off Karma, there are options here of course. such as WebTestRunner, Jest and Vitest. Now if I went down the Jest path, that would mean we could literally use that across the board and replace mocha effectively and its many plugins and start using native v8 code coverage instead of nyc/istanbul which also isn't being updated.

This though might be a big PR, but if all the tests are passing and you can run them then it will be a nice addition. However I don' want to embark on a journey like that unless there is support around that idea. The alternative is to just replace Karma.

I guess to the point above about a controversial change, if I am not changing the core logic and just the testing capability, how far can I go?

dgirardi commented 9 months ago

If Jest requires a big refactoring of our tests it's harder to justify: our suite is ancient, ugly, and huge so I think you'll find that to be a grueling task, and once done it also requires everyone to spend some energy to adapt to the new tool. I am not familiar with it and from a cursory search I don't see any "killer feature" that would make that worthwhile, in fact, I'd be worried about it being slower (allegedly, I don't know if it actually is).