Actually, just to totally rule out some things, you could try compiling Espruino to run natively on your computer, and then try HTTPS on that. I'm not sure if a MacOS native compile works, but it'll work on Linux, or if you have a Raspberry Pi then you could try that?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Actually, just to totally rule out some things, you could try compiling Espruino to run natively on your computer, and then try HTTPS on that. I'm not sure if a MacOS native compile works, but it'll work on Linux, or if you have a Raspberry Pi then you could try that?