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.