coapjs / node-coap

CoAP - Node.js style
MIT License
528 stars 154 forks source link

Fix failing tests #385

Closed JKRhb closed 2 months ago

JKRhb commented 4 months ago

This PR will investigate and hopefully eventually solve the issues we currently observe when it comes to testing the library.

coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 9710474884

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/server.ts 17 19 89.47%
<!-- Total: 22 24 91.67% -->
Files with Coverage Reduction New Missed Lines %
lib/server.ts 2 86.22%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 9363797542: -0.1%
Covered Lines: 2893
Relevant Lines: 3111

💛 - Coveralls
JKRhb commented 4 months ago

Apparently, it's only two tests that are broken under Node 20. I will look into how to solve the problem here.

Apollon77 commented 4 months ago

overlaps replaces https://github.com/coapjs/node-coap/pull/362 ?

JKRhb commented 4 months ago

overlaps replaces #362 ?

Hmm, good point! Maybe updating will actually solve the issue here – I will test it out :)

JKRhb commented 2 months ago

I think this PR is now ready for review :) The tests are passing now again (I also added Node 22 to the test matrix) – however, I needed to skip a few of them since there seem to be some changes in Node 20 and above that cause issues with sinon.

In general, the tests are somewhat flaky at the moment, but I think we can probably deal with that in future PRs. For now, it is probably more important to be able to move forward again (and maybe also release a new version).