Commit graph

4 commits

Author SHA1 Message Date
Francis Gulotta
27788ceae9 Stop autoOpening on next tick
This allows for catching TypeErrors when open gets called

 - Change MockBinding to properly throw and return errors on open
 - Enforce bindings throwing on empty string paths
2016-11-06 00:23:29 -04:00
Francis Gulotta
5306b7f5e1 Give anonymous functions names for debugging
Also throw in some manual testing scripts.
2016-11-05 23:56:22 -04:00
Francis Gulotta
672e8319c3 Conform to NodeJS error message formats (#998)
https://github.com/nodejs/node/pull/3374
2016-11-04 23:29:07 -04:00
Francis Gulotta
39d0103937 Streams rewrite
This is a major change.  To reading, the poller and the bindings layer, there isn’t a great way to do this piecemeal. The goal here is to make bindings a plugin layer, our c++ bindings isolated and tested, and make Serialport a streams object.

- Move all bindings into platform specific modules DarwinBinding LinuxBinding, and WindowsBinding
- Separate out the bindings from the SerialPort class so it can be required by itself.
- Provide mock bindings as a tested first class bindings layer
- Mixin stream methods with `pushBindingWrap`, inspired from fs.readStream
- All integration tests now require an Arduino 
- Ditch sandboxed modules as we don't need to be that heavy handed to test anymore

TODO

- windows binding
- performance test
- memory leak test
- 🎉
2016-11-04 21:03:35 -04:00