fixes test err where err_regex not defined for js