dhleong / wemore

A more awesome library for Belkin WeMo interactions
37 stars 11 forks source link

'nested.close' is not a function when using wemore 0.6.0 #16

Closed andrewferrier closed 5 years ago

andrewferrier commented 5 years ago

The change introduced in commit 7885dd766c3e for wemore 0.6.0 doesn't seem to work correctly when I'm using wemore emulation and my NodeJS server terminates. I get an error of the form:

TypeError: nested.close is not a function
    at /home/xyz/node_modules/wemore/lib/emulate.js:72:16
    at Array.forEach (<anonymous>)
    at process.cleanupServer (/home/xyz/node_modules/wemore/lib/emulate.js:71:20)
    at emitOne (events.js:116:13)
    at process.emit (events.js:211:7)
    at process.exit (internal/process.js:157:15)
    at done (/home/xyz/node_modules/mocha/bin/_mocha:501:15)
    at afterWrite (_stream_writable.js:464:3)
    at _combinedTickCallback (internal/process/next_tick.js:144:20)
    at process._tickCallback (internal/process/next_tick.js:180:9)
error Command failed with exit code 1.

It would appear that close() is not exposed as a function on SsdpServer in the node-ssdp version I am using (2.9.1, which is consistent with the ^2.9.0 which wemore 0.6.0 asks for).

Downgrading to wemore 0.5.0 resolves the issue.

Thanks for your work on this great module!

dhleong commented 5 years ago

Thanks for the heads up! I updated the code to use the proper method and released as 0.6.1. Let me know if there are other problems!

andrewferrier commented 5 years ago

Great, thanks very much!

dhleong commented 5 years ago

Thank you for pointing it out!