mirror of https://github.com/zulip/zulip.git
node tests: Add coverage for python_to_js_filter.
This commit is contained in:
parent
97a07f311e
commit
44078a73bf
|
@ -321,3 +321,12 @@ var bugdown_data = JSON.parse(fs.readFileSync(path.join(__dirname, '../../zerver
|
|||
assert.equal(message.flags.length, 0);
|
||||
assert(message.flags.indexOf('mentioned') === -1);
|
||||
}());
|
||||
|
||||
(function test_python_to_js_filter() {
|
||||
// The only way to reach python_to_js_filter is indirectly, hence the call
|
||||
// to set_realm_filters.
|
||||
markdown.set_realm_filters([[ '/a(?im)a/g'], [ '/a(?L)a/g' ]]);
|
||||
var actual_value = (marked.InlineLexer.rules.zulip.realm_filters);
|
||||
var expected_value = [ /\/aa\/g/gim, /\/aa\/g/g ];
|
||||
assert.deepEqual(actual_value, expected_value);
|
||||
}());
|
||||
|
|
Loading…
Reference in New Issue