need to run
> frap@1.1.0 test /Users/seanegan/prj/frap
> make test

mocha test/T??-*.js
{ ArrayBuffer: [Function: ArrayBuffer],
  Int8Array: { [Function: Int8Array] BYTES_PER_ELEMENT: 1 },
  Uint8Array: { [Function: Uint8Array] BYTES_PER_ELEMENT: 1 },
  Uint8ClampedArray: { [Function: Uint8ClampedArray] BYTES_PER_ELEMENT: 1 },
  Int16Array: { [Function: Int16Array] BYTES_PER_ELEMENT: 2 },
  Uint16Array: { [Function: Uint16Array] BYTES_PER_ELEMENT: 2 },
  Int32Array: { [Function: Int32Array] BYTES_PER_ELEMENT: 4 },
  Uint32Array: { [Function: Uint32Array] BYTES_PER_ELEMENT: 4 },
  Float32Array: { [Function: Float32Array] BYTES_PER_ELEMENT: 4 },
  Float64Array: { [Function: Float64Array] BYTES_PER_ELEMENT: 8 },
  DataView: [Function: DataView],
  global: [Circular],
  process:
   { title: 'node',
     version: 'v0.8.4',
     moduleLoadList:
      [ 'Binding evals',
        'Binding natives',
        'NativeModule events',
        'NativeModule buffer',
        'Binding buffer',
        'NativeModule assert',
        'NativeModule util',
        'NativeModule path',
        'NativeModule module',
        'NativeModule fs',
        'Binding fs',
        'Binding constants',
        'NativeModule stream',
        'NativeModule tty',
        'NativeModule net',
        'NativeModule timers',
        'Binding timer_wrap',
        'NativeModule _linklist',
        'Binding tty_wrap',
        'NativeModule child_process',
        'Binding process_wrap',
        'NativeModule vm',
        'NativeModule crypto',
        'Binding crypto',
        'NativeModule console' ],
     versions:
      { http_parser: '1.0',
        node: '0.8.4',
        v8: '3.11.10.17',
        ares: '1.7.5-DEV',
        uv: '0.8',
        zlib: '1.2.3',
        openssl: '1.0.0f' },
     arch: 'x64',
     platform: 'darwin',
     argv:
      [ 'node',
        '/usr/local/lib/node_modules/mocha/bin/_mocha',
        '--reporter',
        'spec',
        'test/T01-reader.js',
        'test/T10-frap-data.js',
        'test/T11-frap-frame.js',
        'test/T12-frap-stream.js' ],
     execArgv: [],
     env:
      { npm_config_viewer: 'man',
        npm_config_browser: 'open',
        MANPATH: '/usr/local/share/man:/usr/local/mysql/man:/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/usr/X11/man',
        npm_config_showlevel: '2',
        npm_config_rollback: 'true',
        TERM_PROGRAM: 'iTerm.app',
        rvm_bin_path: '/Users/seanegan/.rvm/bin',
        npm_config_usage: '',
        npm_package_homepage: 'https://github.com/lleo/node-frap',
        rvm_quiet_flag: '',
        TERM: 'xterm-256color',
        rvm_gemstone_url: '',
        npm_package_devDependencies_mocha: '1.3.x',
        npm_config_globalignorefile: '/usr/local/etc/npmignore',
        SHELL: '/usr/local/bin/zsh',
        MAKEFLAGS: '',
        npm_config_shell: '/usr/local/bin/zsh',
        npm_config_init_author_url: '',
        TMPDIR: '/var/folders/p3/_sx0719d6q39wfzwjmlt1d0m0000gn/T/',
        rvm_docs_type: '',
        npm_config_parseable: '',
        npm_config_email: 'lleoem@gmail.com',
        Apple_PubSub_Socket_Render: '/tmp/launch-D74rV2/Render',
        npm_config_userignorefile: '/Users/seanegan/.npmignore',
        MESH_HOME: '/Users/seanegan/git/Mesh',
        npm_config_init_author_email: '',
        npm_config_cache_max: 'null',
        rvm_hook: '',
        npm_config_long: '',
        npm_config_ignore: '',
        rvm_tar: 'tar',
        npm_config_npat: '',
        npm_config_registry: 'https://registry.npmjs.org/',
        npm_package_repository_url: 'git://github.com/lleo/node-frap.git',
        npm_config_message: '%s',
        npm_config_versions: '',
        USER: 'seanegan',
        npm_package_description: 'A Socket wrapper that provides simple framing protocol',
        npm_package_dependencies_dequeue: '1.x',
        rvm_gemstone_package_file: '',
        COMMAND_MODE: 'unix2003',
        npm_config_logprefix: 'true',
        __array_start: '1',
        rvm_install_on_use_flag: '',
        npm_config_globalconfig: '/usr/local/etc/npmrc',
        npm_config_always_auth: '',
        rvm_path: '/Users/seanegan/.rvm',
        SSH_AUTH_SOCK: '/tmp/launch-63W5y5/Listeners',
        __CF_USER_TEXT_ENCODING: '0x1F5:0:0',
        Apple_Ubiquity_Message: '/tmp/launch-tRv3Uo/Apple_Ubiquity_Message',
        MAKELEVEL: '1',
        rvm_proxy: '',
        rvm_ruby_file: '',
        PAGER: 'less',
        escape_flag: '1',
        MFLAGS: '',
        npm_package_author_name: 'LLeo',
        rvm_prefix: '/Users/seanegan',
        npm_config_proprietary_attribs: 'true',
        rvm_silent_flag: '',
        rvm_uname: 'Darwin',
        npm_config_logfd: '2',
        npm_config_json: '',
        npm_package_dependencies_underscore: '1.3.x',
        npm_config_coverage: '',
        PATH: '/usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/seanegan/prj/frap/node_modules/.bin:/Users/seanegan/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11/bin:/Users/seanegan/.rvm/bin',
        npm_config_argv: '{"remain":[],"cooked":["test"],"original":["test"]}',
        rvm_ruby_make: '',
        npm_config_pre: '',
        npm_config_description: 'true',
        npm_config_https_proxy: '',
        _: '/usr/local/bin/mocha',
        npm_config_userconfig: '/Users/seanegan/.npmrc',
        npm_config_npaturl: 'http://npat.npmjs.org/',
        PWD: '/Users/seanegan/prj/frap',
        npm_config_user: '501',
        npm_package_author_url: 'http://lleo-blog.blogspot.com/',
        npm_config_bindist: '0.8-ares1.7.5-DEV-evundefined-openssl1.0.0f-v83.11.10.17-darwin-x64-12.0.0',
        npm_config_node_version: '0.8.4',
        npm_package_bugs_url: 'https://github.com/lleo/node-frap/issues',
        npm_package_devDependencies_chai: '1.1.x',
        npm_lifecycle_event: 'test',
        MYSQL_CONFIG: '/usr/local/mysql/bin/mysql_config',
        LANG: 'en_US.UTF-8',
        npm_package_keywords_0: 'socket',
        rvm_sdk: '',
        npm_config_save: '',
        npm_config_editor: 'vi',
        npm_package_name: 'frap',
        npm_package_repository_type: 'git',
        npm_package_keywords_1: 'frame',
        ITERM_PROFILE: 'Default',
        npm_config_tag: 'latest',
        NODE_PATH: '/Users/seanegan/lib/node_modules:/usr/local/lib/node_modules',
        npm_config_global: '',
        npm_package_keywords_2: 'framing',
        _second: '2',
        npm_package_keywords_3: 'protocol',
        npm_config_username: 'lleo',
        rvm_ruby_sha: '',
        npm_config_force: '',
        npm_config_searchopts: '',
        npm_package_engines_node: '>=0.4.0',
        npm_package_main: 'lib/index.js',
        npm_config_depth: 'null',
        npm_config_searchsort: 'name',
        npm_config_rebuild_bundle: 'true',
        npm_package_version: '1.1.0',
        npm_config_outfd: '1',
        rvm_version: '1.10.3',
        npm_config_unicode: 'true',
        npm_config_yes: '',
        COLORFGBG: '11;15',
        rvm_script_name: '',
        SHLVL: '2',
        HOME: '/Users/seanegan',
        rvm_ruby_mode: '',
        npm_package_scripts_test: 'make test',
        npm_config_strict_ssl: 'true',
        npm_config_ca: '"-----BEGIN CERTIFICATE-----\\nMIIChzCCAfACCQDauvz/KHp8ejANBgkqhkiG9w0BAQUFADCBhzELMAkGA1UEBhMC\\nVVMxCzAJBgNVBAgTAkNBMRAwDgYDVQQHEwdPYWtsYW5kMQwwCgYDVQQKEwNucG0x\\nIjAgBgNVBAsTGW5wbSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxDjAMBgNVBAMTBW5w\\nbUNBMRcwFQYJKoZIhvcNAQkBFghpQGl6cy5tZTAeFw0xMTA5MDUwMTQ3MTdaFw0y\\nMTA5MDIwMTQ3MTdaMIGHMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExEDAOBgNV\\nBAcTB09ha2xhbmQxDDAKBgNVBAoTA25wbTEiMCAGA1UECxMZbnBtIENlcnRpZmlj\\nYXRlIEF1dGhvcml0eTEOMAwGA1UEAxMFbnBtQ0ExFzAVBgkqhkiG9w0BCQEWCGlA\\naXpzLm1lMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLI4tIqPpRW+ACw9GE\\nOgBlJZwK5f8nnKCLK629Pv5yJpQKs3DENExAyOgDcyaF0HD0zk8zTp+ZsLaNdKOz\\nGn2U181KGprGKAXP6DU6ByOJDWmTlY6+Ad1laYT0m64fERSpHw/hjD3D+iX4aMOl\\ny0HdbT5m1ZGh6SJz3ZqxavhHLQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAC4ySDbC\\nl7W1WpLmtLGEQ/yuMLUf6Jy/vr+CRp4h+UzL+IQpCv8FfxsYE7dhf/bmWTEupBkv\\nyNL18lipt2jSvR3v6oAHAReotvdjqhxddpe5Holns6EQd1/xEZ7sB1YhQKJtvUrl\\nZNufy1Jf1r0ldEGeA+0ISck7s+xSh9rQD2Op\\n-----END CERTIFICATE-----"',
        npm_config_loglevel: 'http',
        npm_config_dev: '',
        npm_config_group: '20',
        npm_config_version: '',
        ITERM_SESSION_ID: 'w1t0p0',
        npm_package_files_9: 'examples/*',
        npm_config_cache_min: '',
        LESS: '-RMe',
        npm_config_cache: '/Users/seanegan/.npm',
        npm_package_files_8: 'bench/*',
        LOGNAME: 'seanegan',
        npm_config_searchexclude: '',
        _first: '1',
        npm_lifecycle_script: 'make test',
        rvm_alias_expanded: '',
        npm_config_color: 'true',
        npm_package_author_email: 'lleoem@gmail.com',
        rvm_wrapper_name: '',
        npm_package_bugs_email: 'lleoem@gmail.com',
        npm_config_proxy: '',
        rvm_nightly_flag: '',
        npm_package_files_3: 'bench.mk',
        rvm_ruby_make_install: '',
        npm_package_files_2: 'Makefile',
        npm_config_bin_publish: '',
        npm_config_production: '',
        rvm_niceness: '',
        npm_package_files_1: 'package.json',
        npm_package_files_0: 'README.md',
        npm_config_umask: '022',
        npm_package_files_7: 'lib/frap_stream.js',
        npm_config_init_version: '0.0.0',
        npm_config_git: 'git',
        npm_package_files_6: 'lib/frap_reader.js',
        RUBYLIB: '/Users/seanegan/git/LLeo/lib',
        npm_config_init_author_name: '',
        npm_package_files_5: 'lib/frap.js',
        npm_config_onload_script: '',
        npm_config_tmp: '/var/folders/p3/_sx0719d6q39wfzwjmlt1d0m0000gn/T',
        npm_config_unsafe_perm: 'true',
        npm_package_files_10: 'test/T??-*.js',
        npm_config_link: '',
        npm_config_prefix: '/usr/local',
        npm_package_files_4: 'lib/index.js',
        RBXOPT: '-X19',
        npm_package_files_11: 'test/mocha.opts' },
     pid: 61070,
     features:
      { debug: false,
        uv: true,
        ipv6: true,
        tls_npn: true,
        tls_sni: true,
        tls: true },
     execPath: '/usr/local/Cellar/node/0.8.4/bin/node',
     debugPort: 5858,
     _getActiveRequests: [Function],
     _getActiveHandles: [Function],
     _needTickCallback: [Function],
     reallyExit: [Function],
     abort: [Function],
     chdir: [Function],
     cwd: [Function],
     umask: [Function],
     getuid: [Function],
     setuid: [Function],
     setgid: [Function],
     getgid: [Function],
     _kill: [Function],
     _debugProcess: [Function],
     _debugPause: [Function],
     _debugEnd: [Function],
     hrtime: [Function],
     dlopen: [Function],
     uptime: [Function],
     memoryUsage: [Function],
     uvCounters: [Function],
     binding: [Function],
     EventEmitter: [Function: EventEmitter],
     assert: [Function],
     config: { target_defaults: [Object], variables: [Object] },
     _tickCallback: [Function],
     nextTick: [Function],
     stdout: [Getter],
     stderr: [Getter],
     stdin: [Getter],
     openStdin: [Function],
     exit: [Function],
     kill: [Function],
     addListener: [Function],
     on: [Function],
     removeListener: [Function],
     mainModule:
      { id: '.',
        exports: {},
        parent: null,
        filename: '/usr/local/lib/node_modules/mocha/bin/_mocha',
        loaded: false,
        children: [Object],
        paths: [Object] } },
  GLOBAL: [Circular],
  root: [Circular],
  Buffer:
   { [Function: Buffer]
     poolSize: 8192,
     isBuffer: [Function: isBuffer],
     byteLength: [Function],
     concat: [Function] },
  setTimeout: [Function],
  setInterval: [Function],
  clearTimeout: [Function],
  clearInterval: [Function],
  console: [Getter],
  xdescribe: [Function],
  xit: [Function],
  before: [Function],
  after: [Function],
  beforeEach: [Function],
  afterEach: [Function],
  context: [Function],
  describe: [Function],
  specify: [Function],
  it: [Function] }

  FrapReader
    single complete frame
      parse all at once
        #parse
          ◦ should not throw an exception: [2K[0G          ✓ should not throw an exception
          ◦ 'header' event should only be called only once: [2K[0G          ✓ 'header' event should only be called only once
          ◦ 'header' event should have only one argument: [2K[0G          ✓ 'header' event should have only one argument
          ◦ 'header' event first argument should equal 10: [2K[0G          ✓ 'header' event first argument should equal 10
          ◦ 'part' event should be called: [2K[0G          ✓ 'part' event should be called
          ◦ 'part' event should only be called only once: [2K[0G          ✓ 'part' event should only be called only once
          ◦ 'part' event shoule have three arguments: [2K[0G          ✓ 'part' event shoule have three arguments
          ◦ 'part' event first argument should be a Buffer: [2K[0G          ✓ 'part' event first argument should be a Buffer
          ◦ 'part' event first argument should have .length 10: [2K[0G          ✓ 'part' event first argument should have .length 10
          ◦ 'part' event buf should contain string 'XXXXXXXXXX': [2K[0G          ✓ 'part' event buf should contain string 'XXXXXXXXXX'
          ◦ 'part' event second argument, pos, should be 0: [2K[0G          ✓ 'part' event second argument, pos, should be 0
          ◦ 'part' event thrid argument, framelen, should be 10: [2K[0G          ✓ 'part' event thrid argument, framelen, should be 10
          ◦ 'frame' event should be emitted: [2K[0G          ✓ 'frame' event should be emitted
          ◦ 'frame' event should only be emitted once: [2K[0G          ✓ 'frame' event should only be emitted once
          ◦ 'frame' event should only have two arguments: [2K[0G          ✓ 'frame' event should only have two arguments
          ◦ 'frame' event first argument, bufs, should be an Array: [2K[0G          ✓ 'frame' event first argument, bufs, should be an Array
          ◦ 'frame' event bufs should be length 1: [2K[0G          ✓ 'frame' event bufs should be length 1
          ◦ 'frame' event bufs[0] should be instance of Buffer: [2K[0G          ✓ 'frame' event bufs[0] should be instance of Buffer
          ◦ 'frame' event bufs[0] should have .length of 10: [2K[0G          ✓ 'frame' event bufs[0] should have .length of 10
          ◦ 'frame' event bufs[0] should contain 'XXXXXXXXXX' string: [2K[0G          ✓ 'frame' event bufs[0] should contain 'XXXXXXXXXX' string
          ◦ 'frame' event second argument, framelen, should be 10: [2K[0G          ✓ 'frame' event second argument, framelen, should be 10
          ◦ 'data' event should be emitted: [2K[0G          ✓ 'data' event should be emitted
          ◦ 'data' event should only be emitted once: [2K[0G          ✓ 'data' event should only be emitted once
          ◦ 'data' event should only have one argument: [2K[0G          ✓ 'data' event should only have one argument
          ◦ 'data' event first argument, buf, should be instance of Buffer: [2K[0G          ✓ 'data' event first argument, buf, should be instance of Buffer
          ◦ 'data' event buf should have .length of 10: [2K[0G          ✓ 'data' event buf should have .length of 10
          ◦ 'data' event buf should contain 'XXXXXXXXXX' string: [2K[0G          ✓ 'data' event buf should contain 'XXXXXXXXXX' string
      parse one byte at a time
        #parse
          ◦ should not throw an exception: [2K[0G          ✓ should not throw an exception
          ◦ 'header' event should be called: [2K[0G          ✓ 'header' event should be called
          ◦ 'header' event should only be called only once: [2K[0G          ✓ 'header' event should only be called only once
          ◦ 'header' event should have only one argument: [2K[0G          ✓ 'header' event should have only one argument
          ◦ 'header' event first argument should equal 10: [2K[0G          ✓ 'header' event first argument should equal 10
          ◦ 'part' event should be called: [2K[0G          ✓ 'part' event should be called
          ◦ 'part' event should only be called 10 times: [2K[0G          ✓ 'part' event should only be called 10 times
          ◦ each 'part' event shoule have three arguments: [2K[0G          ✓ each 'part' event shoule have three arguments
          ◦ each 'part' event first argument should be a Buffer: [2K[0G          ✓ each 'part' event first argument should be a Buffer
          ◦ each 'part' event first argument should have .length 1: [2K[0G          ✓ each 'part' event first argument should have .length 1
          ◦ each 'part' event buf should contain string 'X': [2K[0G          ✓ each 'part' event buf should contain string 'X'
          ◦ each 'part' event second argument, pos, should be i: [2K[0G          ✓ each 'part' event second argument, pos, should be i
          ◦ each 'part' event thrid argument, framelen, should be 10: [2K[0G          ✓ each 'part' event thrid argument, framelen, should be 10
          ◦ 'frame' event should be emitted: [2K[0G          ✓ 'frame' event should be emitted
          ◦ 'frame' event should only be emitted once: [2K[0G          ✓ 'frame' event should only be emitted once
          ◦ 'frame' event should only have two arguments: [2K[0G          ✓ 'frame' event should only have two arguments
          ◦ 'frame' event first argument, bufs, should be an Array: [2K[0G          ✓ 'frame' event first argument, bufs, should be an Array
          ◦ 'frame' event bufs should be length 10: [2K[0G          ✓ 'frame' event bufs should be length 10
          ◦ 'frame' event bufs[0] should be instance of Buffer: [2K[0G          ✓ 'frame' event bufs[0] should be instance of Buffer
          ◦ 'frame' event bufs[0] should have .length of 1: [2K[0G          ✓ 'frame' event bufs[0] should have .length of 1
          ◦ 'frame' event bufs[0] should contain 'XXXXXXXXXX' string: [2K[0G          ✓ 'frame' event bufs[0] should contain 'XXXXXXXXXX' string
          ◦ 'frame' event second argument, framelen, should be 10: [2K[0G          ✓ 'frame' event second argument, framelen, should be 10
          ◦ 'data' event should be emitted: [2K[0G          ✓ 'data' event should be emitted
          ◦ 'data' event should only be emitted once: [2K[0G          ✓ 'data' event should only be emitted once
          ◦ 'data' event should only have one argument: [2K[0G          ✓ 'data' event should only have one argument
          ◦ 'data' event first argument, buf, should be instance of Buffer: [2K[0G          ✓ 'data' event first argument, buf, should be instance of Buffer
          ◦ 'data' event buf should have .length of 10: [2K[0G          ✓ 'data' event buf should have .length of 10
          ◦ 'data' event buf should contain 'XXXXXXXXXX' string: [2K[0G          ✓ 'data' event buf should contain 'XXXXXXXXXX' string
    three complete frames
      parse all at once
        #parse
          ◦ should emit 'header' & 'part'; 3 each: [2K[0G          ✓ should emit 'header' & 'part'; 3 each
      parse byte at a time
        #parse
          ◦ should emit 1 'header' event & 10 'part' events length 1 each: [2K[0G          ✓ should emit 1 'header' event & 10 'part' events length 1 each

  Frap send/recv data
    ◦ frap should be connected: [2K[0G    ✓ frap should be connected
    ◦ send/recv msg: [2K[0G    ✓ send/recv msg
    ◦ recv_msg should equal send_msg: [2K[0G    ✓ recv_msg should equal send_msg

  Frap send/recv frame
    ◦ frap should be connected: [2K[0G    ✓ frap should be connected
    ◦ send/recv msg: [2K[0G    ✓ send/recv msg
    ◦ recv_msg should equal send_msg: [2K[0G    ✓ recv_msg should equal send_msg

  Frap send/recv frame stream
    ◦ frap should be connected: [2K[0G    ✓ frap should be connected
    ◦ send/recv msg: [2K[0G    ✓ send/recv msg
    ◦ recv_msg should equal send_msg: [2K[0G    ✓ recv_msg should equal send_msg

  ✔ 66 tests complete (78ms) before publishing