message: Tested unloading hook for A to B
diff: @@ -235,4 +235,53 @@ describe('UseSceneUnloading', function () {
  }
  })
  });
  +
  + describe('A to B', function () {
  + it('should call unloading hook on A and not on B', function(){
  + var stateNavigator = new StateNavigator([
  + { key: 'sceneA' },
  + { key: 'sceneB' }
  + ]);
  + stateNavigator.navigate('sceneA');
  + var {sceneA, sceneB} = stateNavigator.states;
  + var unloadingA, unloadingB;
  + var SceneA = () => {
  + useSceneUnloading(() => {
  + unloadingA = true;
  + return true;
  + })
  + return <div />;
  + };
  + var SceneB = () => {
  + useSceneUnloading(() => {
  + unloadingB = true;
  + return true;
  + })
  + return <div />;
  + };
  + sceneA.renderScene = () => <SceneA />;
  + sceneB.renderScene = () => <SceneB />;
  + var container = document.createElement('div');
  + act(() => {
  + ReactDOM.render(
  + <NavigationHandler stateNavigator={stateNavigator}>
  + <NavigationMotion>
  + {(_style, scene, key) => <div key={key}>{scene}</div>}
  + </NavigationMotion>
  + </NavigationHandler>,
  + container
  + );
  + });
  + act(() => {
  + unloadingA = unloadingB = false;
  + stateNavigator.navigate('sceneB');
  + });
  + try {
  + assert.equal(unloadingA, true);
  + assert.equal(unloadingB, false);
  + } finally {
  + ReactDOM.unmountComponentAtNode(container);
  + }
  + })
  + });
  });
  