js: better error message checking
js: better error message checking

Currently, we check exactly matching of error message return by go
standard library. It's working nowaday but not guaranteed to work in
upcoming go version. At least in go1.14, all the certificate expried
message checking test will fail, due to the change of error message
format in net/http.

To fix this, we only check that error message contains the message we
want, e.g certificate expired error should contain word "expired".

While at it, also add some require.NoError to make sure no editor
complains above "can lead to nil pointer dereference".

loadimpact/k6,loadimpact/k6