chrome-mock-api Chrome API mocking library. npm install chrome-mock-api usage In most cases you will want to set this as a global at the top of your test file, because chrome is a global in your extension code. chrome = require('chrome-mock')