TST more tests for errors in JS functions