Closed roydejong closed 4 years ago
It took a bit of work, but this PR is in a state where all the tests now pass successfully on my system, and everything works as expected.
There's still a bug where mocha doesn't exit on its own. It seems PCSCLite.close()
isn't enough to shut everything down cleanly, but I'm not sure how to deal with that. Maybe someone else knows. (Note, it is possible to force mocha to exit anyway after tests with --exit
flag)
Hi @roydejong,
Thank you very much for your PR. I really appreciate the work you did. 👍
I am really sorry it look me so long to review and merge it.
Thanks again.
When running
yarn test
on Windows 10 x64, with Node v10.15.3, the current version ofnode-pcsclite
produces the following error:This causes all tests to fail on my system. This is related to a deprecation / API change in Sinon: https://github.com/sinonjs/sinon/issues/1761#issuecomment-386034296
Some other things I've noticed:
This PR addresses issues with the test suite by:
test.js
.sinon
dependency inpackage.json
to^7.3.2
(latest release).new Buffer()
calls toBuffer.from()
.pcsc.js
.get_reader()
test helper so it uses the correct end marker for reader names (fixes the "#connect()" test).