How to force a JS library to be loaded via HTTPS?
That's a protocol relative include, meaning it will take the current protocol and use that. If you access via http, that's what you would get. Is the site being tested under https? Is something removing the protocols (advagg?)?
Modules like advanced aggregation have settings to remove protocol and make all links protocol relative. Disable settings like that and run the tests again.