Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/9joneg/karma-sinon-chrome

A Karma plugin - adapter for sinon-chrome
https://github.com/9joneg/karma-sinon-chrome

Last synced: about 1 month ago
JSON representation

A Karma plugin - adapter for sinon-chrome

Awesome Lists containing this project

README

        

karma-sinon-chrome
==

A Karma plugin - adapter for sinon chrome

[![Build Status](https://travis-ci.org/9joneg/karma-sinon-chrome.svg?branch=master)](https://travis-ci.org/9joneg/karma-sinon-chrome)

```js
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

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

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

//...
});
};
```

License
--

[MIT](http://9joneg.mit-license.org/)