fixes to js test suite
add specs / tests for commits

  231e045a62eb9915201edd2772aa714420e91b57 and
  ce1706e979aa01e0f97da0c88c494f8371476613