hunk.code_window:   if (!machine.states) {
       return EMPTY_MAP;
     }
     const adjacency = getValueAdjacencyMap(machine, options);
     const pathMap: PathMap = {};
     const visited: Set<string> = new Set();
     function util(state: State<TContext>): PathMap {
  
hunk.labels: keep keep keep replace keep keep keep keep
hunk.after_edit:   const adjacency = getValueAdjacencyMap<TContext, TEvent>(machine, options);
  
hunk.file_path: src/graph.ts
hunk.type: replace
file: import { assert } from 'chai';
  import { Machine } from '../src/index';
  
  describe('state meta data', () => {
    const pedestrianStates = {
      initial: 'walk',
      states: {
        walk: {
          meta: { walkData: 'walk data' },
          on: {
            PED_COUNTDOWN: 'wait'
          },
          onEntry: 'enter_walk',
          onExit: 'exit_walk'
        },
        wait: {
          meta: { waitData: 'wait data' },
          on: {
            PED_COUNTDOWN: 'stop'
          },
          onEntry: 'enter_wait',
          onExit: 'exit_wait'
        },
        stop: {
          meta: { stopData: 'stop data' },
          onEntry: 'enter_stop',
          onExit: 'exit_stop'
        }
      }
    };
  
    const lightMachine = Machine({
      key: 'light',
      initial: 'green',
      states: {
        green: {
          meta: ['green', 'array', 'data'],
          on: {
            TIMER: 'yellow',
            POWER_OUTAGE: 'red',
            NOTHING: 'green'
          },
          onEntry: 'enter_green',
          onExit: 'exit_green'
        },
        yellow: {
          meta: { yellowData: 'yellow data' },
          on: {
            TIMER: 'red',
            POWER_OUTAGE: 'red'
          },
          onEntry: 'enter_yellow',
          onExit: 'exit_yellow'
        },
        red: {
          meta: {
            redData: {
              nested: {
                red: 'data',
                array: [1, 2, 3]
              }
            }
          },
          on: {
            TIMER: 'green',
            POWER_OUTAGE: 'red',
            NOTHING: 'red'
          },
          onEntry: 'enter_red',
          onExit: 'exit_red',
          ...pedestrianStates
        }
      }
    });
  
    it('states should aggregate meta data', () => {
      const yellowState = lightMachine.transition('green', 'TIMER');
      assert.deepEqual(yellowState.meta, {
        'light.yellow': {
          yellowData: 'yellow data'
        }
      });
      assert.notProperty(yellowState.meta, 'light.green');
      assert.notProperty(yellowState.meta, 'light');
    });
  
    it('states should aggregate meta data (deep)', () => {
      assert.deepEqual(lightMachine.transition('yellow', 'TIMER').meta, {
        'light.red': {
          redData: {
            nested: {
              array: [1, 2, 3],
              red: 'data'
            }
          }
        },
        'light.red.walk': {
          walkData: 'walk data'
        }
      });
    });
  });
  