acvetkov / sinon-chrome

Testing chrome extensions with Node.js
ISC License
434 stars 46 forks source link

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

Open nickmccurdy opened 3 years ago

nickmccurdy commented 3 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.