hunk.code_window:     if (!child) {
         throw new Error(
           `Unable to send event to child '${to}' from interpreter '${this.id}'.`
         );
  
hunk.labels: keep replace replace replace keep
hunk.after_edit:     if (!target) {
         if (!isParent) {
           throw new Error(
             `Unable to send event to child '${to}' from service '${this.id}'.`
           );
         }
         // tslint:disable-next-line:no-console
         console.warn(
           `Service '${this.id}' has no parent: unable to send event ${event.type}`
  
hunk.file_path: src/interpreter.ts
hunk.type: replace
file: import { assert } from 'chai';
  // import { Machine, State } from '../src/index';
  import { toggle } from '../src/patterns';
  
  describe('patterns', () => {
    describe('toggle pattern', () => {
      it('should produce a partial state machine with a binary toggle', () => {
        assert.deepEqual(toggle('on', 'off', 'SWITCH'), {
          on: { on: { SWITCH: 'off' } },
          off: { on: { SWITCH: 'on' } }
        });
      });
    });
  });
  