grafana / k6

A modern load testing tool, using Go and JavaScript - https://k6.io
GNU Affero General Public License v3.0
26.1k stars 1.27k forks source link

refactor: extract `js` and `js/modulestest` parts that are to do with setupping the js environment into a single place #4069

Open mstoykov opened 1 week ago

mstoykov commented 1 week ago

Currenlty both the js package and js/modulestest do a number of things to configure Sobek.runtime and modules.ModuleSystem in order to have the same behaviour.

This still doesn't actually make it so and does require that a number of realistically internal details are exported but are in practice only meant to be used internally:

Likely many more.

It also happens that we have two implementations that make it harder to work around.