Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/9joneg/karma-sinon-chrome
- Owner: 9joneg
- Created: 2015-04-29T13:00:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-08T14:36:38.000Z (almost 7 years ago)
- Last Synced: 2024-10-04T17:37:15.910Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 8
- Watchers: 0
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-browser-extensions-and-apps - karma-sinon-chrome - karma adapter to run extension tests with sinon-chrome. (Tools / Testing)
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/)