refactor: extract `js` and `js/modulestest` parts that are to do with setupping the js environment into a single place
Opened this issue · 0 comments
mstoykov commented
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:
- the whole eventloop
- modules.ModuleSystem and co.
Line 71 in ddc3b0b
- https://github.com/grafana/k6/blob/master/js/common/randsource.go
Likely many more.
It also happens that we have two implementations that make it harder to work around.