Fixing js unit tests