hunk.code_window:     }
     }
     return defaultValue(state);
   }
hunk.labels: keep keep keep replace keep
hunk.after_edit:   return defaultValue(resolvedState);
  
hunk.file_path: src/match.ts
hunk.type: replace
file: import { Machine } from '../src';
  import { assert } from 'chai';
  
  const config = {
    initial: 'a',
    states: {
      a: {
        initial: 'b',
        states: {
          b: {
            initial: 'c',
            states: {
              c: {}
            }
          }
        }
      },
      leaf: {}
    }
  };
  
  const deepMachine = Machine(config);
  
  const parallelDeepMachine = Machine({
    type: 'parallel',
    states: {
      foo: config,
      bar: config
    }
  });
  
  const deepParallelMachine = Machine({
    initial: 'one',
    states: {
      one: parallelDeepMachine.config,
      two: parallelDeepMachine.config
    }
  });
  
  describe('Initial states', () => {
    it('should return the correct initial state', () => {
      assert.deepEqual(deepMachine.initialState.value, { a: { b: 'c' } });
    });
  
    it('should return the correct initial state (parallel)', () => {
      assert.deepEqual(parallelDeepMachine.initialState.value, {
        foo: { a: { b: 'c' } },
        bar: { a: { b: 'c' } }
      });
    });
  
    it('should return the correct initial state (deep parallel)', () => {
      assert.deepEqual(deepParallelMachine.initialState.value, {
        one: {
          foo: { a: { b: 'c' } },
          bar: { a: { b: 'c' } }
        }
      });
    });
  
    it('should return undefined for leaf nodes', () => {
      assert.throws(() => deepMachine.states.leaf.initialState);
    });
  });
  