message: Tested navigation back link overrides context
diff: @@ -562,12 +562,64 @@ describe('NavigationBackLinkTest', function () {
  </NavigationHandler>,
  container
  );
  - var div = container.querySelector<HTMLAnchorElement>('div');
  + var div = container.querySelector<HTMLDivElement>('div');
  Simulate.click(div);
  assert.equal(stateNavigator.stateContext.state, stateNavigator.states['s0']);
  })
  });
  + describe('Old Context Navigation Back Link', function () {
  + it('should update', function(){
  + var stateNavigator = new StateNavigator([
  + { key: 's0', route: 'r0' },
  + { key: 's1', route: 'r1', trackCrumbTrail: true },
  + { key: 's2', route: 'r2', trackCrumbTrail: true },
  + ]);
  + class FirstContext extends React.Component {
  + static contextType = NavigationContext;
  + private mountContext: any;
  + constructor(props, context) {
  + super(props, context);
  + this.mountContext = this.context;
  + }
  + render() {
  + return (
  + <NavigationContext.Provider value={this.mountContext}>
  + {this.props.children}
  + </NavigationContext.Provider>
  + );
  + }
  + }
  + stateNavigator.navigate('s0', {x: 'a'});
  + stateNavigator.navigate('s1', {y: 'b'});
  + var container = document.createElement('div');
  + ReactDOM.render(
  + <NavigationHandler stateNavigator={stateNavigator}>
  + <FirstContext>
  + <NavigationBackLink
  + distance={1}>
  + link text
  + </NavigationBackLink>
  + </FirstContext>
  + </NavigationHandler>,
  + container
  + );
  + stateNavigator.navigate('s2', {z: 'c'});
  + var link = container.querySelector<HTMLAnchorElement>('a');
  + Simulate.click(link);
  + assert.equal(stateNavigator.stateContext.url, '/r0?x=a');
  + assert.equal(stateNavigator.stateContext.state, stateNavigator.states['s0']);
  + assert.equal(stateNavigator.stateContext.data.x, 'a');
  + assert.equal(stateNavigator.stateContext.oldUrl, '/r1?y=b&crumb=%2Fr0%3Fx%3Da');
  + assert.equal(stateNavigator.stateContext.oldState, stateNavigator.states['s1']);
  + assert.equal(stateNavigator.stateContext.oldData.y, 'b');
  + assert.equal(stateNavigator.stateContext.previousUrl, undefined);
  + assert.equal(stateNavigator.stateContext.previousState, undefined);
  + assert.equal(Object.keys(stateNavigator.stateContext.previousData).length, 0);
  + assert.equal(stateNavigator.stateContext.crumbs.length, 0);
  + })
  + });
  +
  /*describe('Click Deferred Navigation Back Link', function () {
  it('should navigate async', function(done){
  var stateNavigator = new StateNavigator([
  