wekan/packages/kadira-flow-router/test/common/router.addons.spec.js
Martin Filser c925a27870 Fixing opening cards and slow performance of closing cards
Fixes: #5533
Fixes: #5548

Revert "Switch from kadira:flow-router to ostrio:flow-router-extra"

This reverts commit 718c1a393d.
2024-10-22 21:45:36 +02:00

30 lines
730 B
JavaScript

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
});
});