message: Added route version of custom trail navigation data test
diff: @@ -2009,6 +2009,68 @@ describe('Navigation Data', function () {
  }
  });
  + describe('Custom Trail Route', function() {
  + var stateNavigator: StateNavigator;
  + beforeEach(function() {
  + stateNavigator = new StateNavigator([
  + { key: 's', route: 'r/{n?}/{t?}', trackCrumbTrail: true },
  + ]);
  + var state = stateNavigator.states['s'];
  + state.truncateCrumbTrail = (state, crumbs, data) => {
  + var lastCrumb = crumbs[crumbs.length - 1];
  + return lastCrumb && lastCrumb.data.n === data.n ? crumbs.slice(0, -1) : crumbs;
  + };
  + });
  +
  + describe('Navigate', function() {
  + beforeEach(function() {
  + stateNavigator.navigate('s');
  + stateNavigator.navigate('s', { n: 1, t: 'a' });
  + stateNavigator.navigate('s', { n: 1, t: 'b' });
  + stateNavigator.navigate('s', { n: 2 });
  + });
  + test();
  + });
  +
  + describe('Navigate Link', function() {
  + beforeEach(function() {
  + var link = stateNavigator.getNavigationLink('s');
  + stateNavigator.navigateLink(link);
  + link = stateNavigator.getNavigationLink('s', { n: 1, t: 'a' });
  + stateNavigator.navigateLink(link);
  + link = stateNavigator.getNavigationLink('s', { n: 1, t: 'b' });
  + stateNavigator.navigateLink(link);
  + link = stateNavigator.getNavigationLink('s', { n: 2 });
  + stateNavigator.navigateLink(link);
  + });
  + test();
  + });
  +
  + describe('Fluent Navigate', function() {
  + beforeEach(function() {
  + var link = stateNavigator.fluent()
  + .navigate('s')
  + .navigate('s', { n: 1, t: 'a' })
  + .navigate('s', { n: 1, t: 'b' })
  + .navigate('s', { n: 2 })
  + .url;
  + stateNavigator.navigateLink(link);
  + });
  + test();
  + });
  +
  + function test() {
  + it('should populate crumb trail', function() {
  + assert.equal(stateNavigator.stateContext.crumbs.length, 2);
  + assert.equal(stateNavigator.stateContext.crumbs[0].state, stateNavigator.states['s']);
  + assert.equal(stateNavigator.stateContext.crumbs[0].data.n, null);
  + assert.equal(stateNavigator.stateContext.crumbs[1].state, stateNavigator.states['s']);
  + assert.strictEqual(stateNavigator.stateContext.crumbs[1].data.n, 1);
  + assert.strictEqual(stateNavigator.stateContext.crumbs[1].data.t, 'b');
  + });
  + }
  + });
  +
  describe('Defaults', function() {
  var stateNavigator: StateNavigator;
  beforeEach(function() {
  