message: Tested navigating hook for A -> B to C -> B
diff: @@ -274,4 +274,64 @@ describe('UseSceneNavigating', function () {
  }
  })
  });
  +
  + describe('A -> B to C -> B', function () {
  + it('should call navigating hook on B and not on A or C', function(){
  + var stateNavigator = new StateNavigator([
  + { key: 'sceneA' },
  + { key: 'sceneB', trackCrumbTrail: true },
  + { key: 'sceneC' }
  + ]);
  + stateNavigator.navigate('sceneA');
  + var {sceneA, sceneB, sceneC} = stateNavigator.states;
  + var navigatingA, navigatingB, navigatingC;
  + var SceneA = () => {
  + useSceneNavigating(() => {
  + navigatingA = true;
  + })
  + return <div />;
  + };
  + var SceneB = () => {
  + useSceneNavigating(() => {
  + navigatingB = true;
  + })
  + return <div />;
  + };
  + var SceneC = () => {
  + useSceneNavigating(() => {
  + navigatingC = true;
  + })
  + return <div />;
  + };
  + sceneA.renderScene = () => <SceneA />;
  + sceneB.renderScene = () => <SceneB />;
  + sceneC.renderScene = () => <SceneC />;
  + var container = document.createElement('div');
  + act(() => {
  + ReactDOM.render(
  + <NavigationHandler stateNavigator={stateNavigator}>
  + <NavigationMotion>
  + {(_style, scene, key) => <div key={key}>{scene}</div>}
  + </NavigationMotion>
  + </NavigationHandler>,
  + container
  + );
  + stateNavigator.navigate('sceneB');
  + });
  + act(() => {
  + navigatingA = navigatingB = navigatingC = false;
  + var url = stateNavigator.fluent()
  + .navigate('sceneC')
  + .navigate('sceneB').url;
  + stateNavigator.navigateLink(url);
  + });
  + try {
  + assert.equal(navigatingA, false);
  + assert.equal(navigatingB, true);
  + assert.equal(navigatingC, false);
  + } finally {
  + ReactDOM.unmountComponentAtNode(container);
  + }
  + })
  + });
  });
  