message: Added test for navigating hook on A --> B
diff: @@ -5,7 +5,6 @@ import { NavigationHandler } from 'navigation-react';
  import { NavigationMotion, useSceneNavigating } from 'navigation-react-mobile';
  import React from 'react';
  import ReactDOM from 'react-dom';
  -import { Simulate } from 'react-dom/test-utils';
  import { JSDOM } from 'jsdom';
  declare var global: any;
  @@ -28,7 +27,7 @@ describe('UseScene', function () {
  navigatingA = true;
  })
  return <div />;
  - }
  + };
  sceneA.renderScene = () => <SceneA />;
  var container = document.createElement('div');
  ReactDOM.render(
  @@ -46,4 +45,47 @@ describe('UseScene', function () {
  }
  })
  });
  +
  + describe('A to A -> B', function () {
  + it('should call navigating hook on B', function(){
  + var stateNavigator = new StateNavigator([
  + { key: 'sceneA' },
  + { key: 'sceneB', trackCrumbTrail: true }
  + ]);
  + stateNavigator.navigate('sceneA');
  + var {sceneA, sceneB} = stateNavigator.states;
  + var navigatingA, navigatingB = false;
  + var SceneA = () => {
  + useSceneNavigating(() => {
  + navigatingA = true;
  + })
  + return <div />;
  + };
  + var SceneB = () => {
  + useSceneNavigating(() => {
  + navigatingB = true;
  + })
  + return <div />;
  + };
  + sceneA.renderScene = () => <SceneA />;
  + sceneB.renderScene = () => <SceneB />;
  + var container = document.createElement('div');
  + ReactDOM.render(
  + <NavigationHandler stateNavigator={stateNavigator}>
  + <NavigationMotion duration={0}>
  + {(_style, scene, key) => <div key={key}>{scene}</div>}
  + </NavigationMotion>
  + </NavigationHandler>,
  + container
  + );
  + navigatingA = navigatingB = false;
  + stateNavigator.navigate('sceneB');
  + try {
  + assert.equal(navigatingA, false);
  + assert.equal(navigatingB, true);
  + } finally {
  + ReactDOM.unmountComponentAtNode(container);
  + }
  + })
  + });
  });
  