##// END OF EJS Templates
Add a requirejs shim for highlight.js...
Add a requirejs shim for highlight.js Before this, highlighting code in markdown cells was broken since hljs wasn't available. A better solution might be to build the highlight.js amd module (i.e., build the highlight.js module with `--target=amd`) so that we don't need the shim.

File last commit:

r15946:60417138
r17302:ca7c58b3
Show More
dualmode_movecell.js
24 lines | 1.0 KiB | application/javascript | JavascriptLexer
// Test
casper.notebook_test(function () {
var a = 'print("a")';
var index = this.append_cell(a);
this.execute_cell_then(index);
var b = 'print("b")';
index = this.append_cell(b);
this.execute_cell_then(index);
this.then(function () {
// Cell movement ( ctrl-(k or j) )
this.select_cell(2);
this.test.assertEquals(this.get_cell_text(2), b, 'select 2; Cell 2 text is correct');
this.trigger_keydown('ctrl-k'); // Move cell 2 up one
this.test.assertEquals(this.get_cell_text(1), b, 'ctrl-k; Cell 1 text is correct');
this.test.assertEquals(this.get_cell_text(2), a, 'ctrl-k; Cell 2 text is correct');
this.validate_notebook_state('ctrl-k', 'command', 1);
this.trigger_keydown('ctrl-j'); // Move cell 1 down one
this.test.assertEquals(this.get_cell_text(1), a, 'ctrl-j; Cell 1 text is correct');
this.test.assertEquals(this.get_cell_text(2), b, 'ctrl-j; Cell 2 text is correct');
this.validate_notebook_state('ctrl-j', 'command', 2);
});
});