Embed Chai.js (k6chaijs) into the k6 binary

Do you want to use Chai.js (k6chaijs) but don’t want external dependencies?
Try the xk6-chai extension, which includes Chai.js (k6chaijs) built-in.

As always, I look forward to your feedback.

2 Likes

Hi @szkiba,

Can you provide some performance comparision given that this is about pefroamance improvements(or so it seems).

I did try it and given that what you do in the extension is basically what k6 does either way - I expect the only difference will be the initial getting of the source over the network.

My testing with 10k VUs (and nothing but loading one or the other module) did show no change, although I do get 35ms request so :person_shrugging:

extended compatibility mode

k6 will not go through (internal) babel (which is the slow part) if it can just parse the source - which it can as k6chai.js is made to be easily loaded in k6.

Also hopefully soon :tm: the internal babel will be dropped. :crossed_fingers:

2 Likes

Hi @mstoykov ,

You are right, sorry for misleading sentence. I removed it from post and repo as well.

Thank you for your feedback

BR
Iván