Libraries/NavigationExperimental/Reducer/__tests__/NavigationScenesReducer-test.js
/**
 * Simulate scenes transtion with changes of navigation states.
 */
Simulate scenes transtion with changes of navigation states.
Simulate scenes transtion with changes of navigation states .
function testTransition(states) {
  const navigationStates = states.map(keys => {
    return {
      children: keys.map(key => {
        return { key };
      }),
    };
  });
  let scenes = [];
  let prevState = null;
  navigationStates.forEach((nextState) => {
    scenes = NavigationScenesReducer(scenes, nextState, prevState);
    prevState = nextState;
  });
  return scenes;
}
function testTransition ( states ) { const navigationStates = states . map ( keys => { return { children : keys . map ( key => { return { key } ; } ) , } ; } ) ; let scenes = [ ] ; let prevState = null ; navigationStates . forEach ( ( nextState ) => { scenes = NavigationScenesReducer ( scenes , nextState , prevState ) ; prevState = nextState ; } ) ; return scenes ; }
Simulate scenes transtion with changes of navigation states.
Simulate scenes transtion with changes of navigation states .