openhab / openhab-js

openHAB JavaScript Library for JavaScript Scripting Automation
https://www.openhab.org/addons/automation/jsscripting/
Eclipse Public License 2.0
38 stars 31 forks source link

Support for ES Modules #256

Open binarious opened 1 year ago

binarious commented 1 year ago

I'd like to use ES Modules in the openHAB Scripting Bridge.

Modern tools like vitest only allow mocking of ES Modules and don't support CommonJS require imports. Therefore it's currently pretty cumbersome to write unit tests with these tools for openHAB scripts.