FlowFuse / device-agent

An agent to run FlowFuse managed instances of Node-RED on devices
Apache License 2.0
15 stars 8 forks source link

Remove Object.hasOwn #248

Closed knolleary closed 3 months ago

knolleary commented 3 months ago

To keep Node 14 support going, we cannot use Object.hasOwn. A couple instances crept in recently that were not caught by our unit tests.

Curiously, we have unit tests in this area and we run tests with Node 14. But on closer inspection, the glob used to run tests was missing quotes. This meant it wasn't getting evaluated properly and failed to include any _spec files nests two levels down. The only such spec file was the logging file that would have caught this error.

Have removed the hasOwn and updated the test command to ensure all tests get run