How to test local Restful nodejs app with SSL?

I'm having trouble testing my nodejs app because https throw DEPTH_ZERO_SELF_SIGNED_CERT. I've tried a half dozen ways of generating local certs and can't seem to find a way around it.

I'm currently testing with Mocha/chai and would like to do two basic tests -Restful request fails when not https -Restful request passes when https

I'm using this for the options on my https server

var credentials = {
    ca:config.ca_cert, 
    key: fs.readFileSync(config.ssl_site_key_path), 
    cert: fs.readFileSync(config.ssl_site_crt_path),
    rejectUnauthorized: config.reject_unauthorized
};

edit: Just FYI my tests work fine on the live server with CA signed certs

Any suggested work arounds?