From fbc99d240ff8aeaac8b26675b31232f375633415 2014-01-23 18:08:56 From: Matthias BUSSONNIER Date: 2014-01-23 18:08:56 Subject: [PATCH] add kernel test --- diff --git a/IPython/html/tests/casperjs/test_cases/kerneljs_test.js b/IPython/html/tests/casperjs/test_cases/kerneljs_test.js new file mode 100644 index 0000000..0ee63ad --- /dev/null +++ b/IPython/html/tests/casperjs/test_cases/kerneljs_test.js @@ -0,0 +1,29 @@ + +// +// Miscellaneous javascript tests +// +casper.notebook_test(function () { + this.evaluate(function () { + IPython.notebook.kernel.kernel_info( + function(msg){ + IPyton._kernel_info_response = msg; + }) + }); + + this.waitFor( + function () { + return this.evaluate(function(){ + return IPython._kernel_info_response; + }); + }); + + this.then( + function () { + var kernel_info_response= this.evaluate(function(){ + return IPython._kernel_info_response; + }); + this.test.assertTrue( kernel_info_response.msg_type === 'kernel_info_reply', 'Kernel info request return kernel_info_reply'); + this.test.assertTrue( kernel_info_response.content !== undefined, 'Kernel_info_reply is not undefined'); + ); + +});