From cdf3e741f2a3decbb46d7de768f0f7ddd87f0ef5 2013-11-08 00:34:14 From: Paul Ivanov Date: 2013-11-08 00:34:14 Subject: [PATCH] added test of IPython.version to js test suite --- diff --git a/IPython/html/tests/casperjs/test_cases/misc_tests.js b/IPython/html/tests/casperjs/test_cases/misc_tests.js new file mode 100644 index 0000000..e5c3484 --- /dev/null +++ b/IPython/html/tests/casperjs/test_cases/misc_tests.js @@ -0,0 +1,21 @@ + +// +// Miscellaneous javascript tests +// +casper.notebook_test(function () { + var jsver = this.evaluate(function () { + var cell = IPython.notebook.get_cell(0); + cell.set_text('import IPython; print IPython.__version__'); + cell.execute(); + return IPython.version + }); + + this.wait_for_output(0); + + // refactor this into just a get_output(0) + this.then(function () { + var result = this.get_output_cell(0); + this.test.assertEquals(result.text.trim(), jsver, 'IPython.version in JS matches IPython.'); + }); + +});