mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
* In most cases, eslint --fix with the right comma-dangle settings was able to update the code correctly. * The exceptions were cases where the parser incorrectly treated the arguments to functions like `assert_equal` as arguments; we fixed these manually. Since this is test code, we can be reasonably confident that just fixing the failures suffices to correct any bugs introduced by making changes automatically.
21 lines
610 B
JavaScript
21 lines
610 B
JavaScript
var hashchange = require('js/hashchange.js');
|
|
|
|
(function test_basics() {
|
|
var operators;
|
|
var hash;
|
|
|
|
operators = [
|
|
{operator: 'stream', operand: 'devel'},
|
|
{operator: 'topic', operand: 'algol'},
|
|
];
|
|
hash = hashchange.operators_to_hash(operators);
|
|
assert.equal(hash, '#narrow/stream/devel/topic/algol');
|
|
|
|
operators = [
|
|
{operator: 'stream', operand: 'devel'},
|
|
{operator: 'topic', operand: 'visual c++', negated: true},
|
|
];
|
|
hash = hashchange.operators_to_hash(operators);
|
|
assert.equal(hash, '#narrow/stream/devel/-topic/visual.20c.2B.2B');
|
|
}());
|