Check for Python errors in js tests

When running a cell in the js tests,
this checks for any errors and treats them as a failure.

Helps avoid confusion caused by silently ignoring failures in Python code.
Merge pull request #6637 from minrk/notice-python-error

Check for Python errors in js tests