# karma-sinon

> Sinon for Karma

Latest version **1.0.5** (published 2016-05-04) · 0 weekly downloads

## Install

```sh
npm install karma-sinon
pnpm add karma-sinon
yarn add karma-sinon
bun add karma-sinon
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2016-05-04 |
| First published | 2013-09-12 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 32 |
| Author | Janusz Jablonski |
| Maintainers | yanoosh |
| Keywords | karma, karma-plugin, sinon, mock |

## Links

- npm: https://www.npmjs.com/package/karma-sinon
- Repository: https://github.com/yanoosh/karma-sinon
- Homepage: https://github.com/yanoosh/karma-sinon#readme
- Issues: https://github.com/yanoosh/karma-sinon/issues
- npm.io page: https://npm.io/package/karma-sinon

## Alternatives

- [pagerjs](https://npm.io/package/pagerjs.md) — 60 weekly downloads
- [whistle.savefor-mock](https://npm.io/package/whistle.savefor-mock.md) — 4 weekly downloads
- [@onify/fake-amqplib](https://npm.io/package/@onify/fake-amqplib.md) — 0 weekly downloads
- [jest-mock-axios](https://npm.io/package/jest-mock-axios.md) — 0 weekly downloads
- [sinon-chai-es](https://npm.io/package/sinon-chai-es.md) — 0 weekly downloads

## Recent versions

- 1.0.5 (latest) — 2016-05-04
- 1.0.4 — 2014-11-26
- 1.0.3 — 2014-03-13
- 1.0.2 — 2014-02-04
- 1.0.0 — 2013-11-16
- 0.0.1 — 2013-09-12

## README

karma-sinon
===========

Sinon for karma

Installation
------------

Install the module via npm

```sh
$ npm install karma-sinon sinon --save-dev
```

Add `sinon` to the `frameworks` key in your Karma configuration:

```js
module.exports = function(config) {
  'use strict';
  config.set({
    #...
    frameworks: ['jasmine', 'sinon'],
    #...
  });
}
```

**Example**
```javascript
describe("sinon example test", function () {
    var time2013_10_01;

    time2013_10_01 = (new Date(2013, 10-1, 1)).getTime();

    before(function() {
        // sinon was defined in global scope
        this.fakeTimer = new sinon.useFakeTimers(time2013_10_01);
    });

    it("some test", function() {
        //test
    });

    after(function() {
        this.fakeTimer.restore();
    });

});
```

---
_Source: https://npm.io/package/karma-sinon · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
