Closed roeycohen closed 7 years ago
i'm not sure how to fix this... are the tests using objects with toJSON method?
ok, i've made the change. now all tests are passed.
toJSON might return Buffers and Dates and all kind of things and i wanted it to support these cases...
return _encode(value.toJSON())
this is the same as putting the toJSON at the beginning of the _encode method and we also have the initial call from encode.
i'll write a few more tests and push again.
ok, added a new test. hope now everything is ready for merging :)
well that's weird... i've only changed indentation in test file...
@roeycohen I implemented it a bit differently, please see https://github.com/darrachequesne/notepack/pull/8
I think the failure was due to a timeout during the tests, so I increased the value here.
Again, thanks :+1:
seems great :) to bad i didn't notice the "return" call at the end of each type...
it will be nice to update the package.json file of https://github.com/socketio/socket.io-redis/blob/master/package.json to the latest release of this plugin.
added to the encoder support for objects with toJSON method.