The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wekan/packages/kadira-flow-router/test/common/router.addons.spec.js

31 lines
730 B

Router = FlowRouter.Router;
Tinytest.addAsync('Common - Addons - onRouteRegister basic usage', function (test, done) {
var name = Random.id();
var customField = Random.id();
var pathDef = '/' + name;
FlowRouter.onRouteRegister(function(route) {
test.equal(route, {
pathDef: pathDef,
// Route.path is deprecated and will be removed in 3.0
path: pathDef,
name: name,
options: {customField: customField}
});
FlowRouter._onRouteCallbacks = [];
done();
});
FlowRouter.route(pathDef, {
name: name,
action: function() {},
subscriptions: function() {},
triggersEnter: function() {},
triggersExit: function() {},
customField: customField
});
});