Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 757 Bytes

README.md

File metadata and controls

42 lines (31 loc) · 757 Bytes

karma-sinon-chrome

A Karma plugin - adapter for sinon chrome

Build Status

it('should create a new tab', function() {
  chrome.browserAction.onClicked.addListener(function() {
    chrome.tabs.create({});
  });
  chrome.browserAction.onClicked.trigger();
  expect(chrome.tabs.create.called).toBe(true);
});

Installation

$ npm i -D karma-sinon-chrome

Add sinon-chrome to the frameworks key in your Karma configuration

module.exports = function(config) {
  config.set({
    //...

    frameworks: ['jasmine', 'sinon-chrome']

    //...
  });
};

License

MIT