import http from 'k6/http'; doesn’t actually resolve to a true node_modules module, I’m having issues mocking this and
I’m open to suggestions, I found GitHub - szkiba/xk6-mock: A k6 extension for mocking HTTP(S) servers during test development. but I just want to define an NPM dep.
Why not publish to NPM the k6 libs, yes there’s a downside in scripts potentially bundling and increasing filesize when it’s already part of a runtime but it’d simplify a lot of aspects in writing tests.
Why not publish to NPM the k6 libs
Does that answer your question?
Hi there, thanks for the reply!
It does answer as to why, but I’m wondering if there’s a way to publish something useable so that I can effectively write or mock out unit tests.
I’m not very familiar with the whole Node ecosystem myself, and I’m not unfortunately aware of a direct solution to what you’re looking for myself