acvetkov / sinon-chrome

Testing chrome extensions with Node.js
ISC License
439 stars 48 forks source link

chrome.runtime.id should be a non-empty string #104

Open nickserv opened 4 years ago

nickserv commented 4 years ago

Various libraries like webextension-polyfill expect chrome.runtime.id to be a non-empty string. This causes several issues integrating sinon-chrome such as https://github.com/mozilla/webextension-polyfill/issues/236 and #103. While sinon-chrome can't guess the exact id, using something like "testid" (suggested in https://github.com/mozilla/webextension-polyfill/issues/218#issuecomment-584936358) seems to work pretty well. Alternatively we could use a random string of lowercase letters so it's not a hard coded value.