# sinon-jquery

> Sinon matcher for matching jQuery collections

Latest version **1.0.3** (published 2019-12-17) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-12-17 |
| First published | 2015-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 12.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dan Phillimore |
| Maintainers | asmblah |
| Keywords | sinon, jquery, matcher, chai |

## Links

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

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [babelify](https://npm.io/package/babelify.md) ^10.0.0
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.0.0
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.7.6

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2019-12-17
- 1.0.2 — 2016-09-30
- 1.0.1 — 2015-09-11
- 1.0.0 — 2015-09-11

## README

Sinon-jQuery
============

[![Build Status](https://secure.travis-ci.org/jadu/sinon-jquery.png?branch=master)](http://travis-ci.org/jadu/sinon-jquery)

Sinon matcher for matching jQuery collections.

```javascript
npm install --save-dev sinon-jquery
```

Add to your test harness:
```javascript
var $ = require('jquery'),
    sinon = require('sinon'),
    sinonjQuery = require('sinon-jquery');
    
sinonjQuery.useWith(sinon, $);
```

We recommend you use this with [Sinon-Chai][] (`npm install --save-dev sinon-chai`)
```javascript
var chai = require('chai'),
    sinonChai = require('sinon-chai');

chai.use(sinonChai);
```

Then use as a matcher, eg. with Mocha+Chai+Sinon-Chai+Sinon-jQuery:

```javascript
it('should pass a <section> element to Display.show()', function () {
    this.handler.handle();

    expect(this.display.show).to.have.been.calledWith(sinon.match.jQuery('section'));
});
```

[Sinon-Chai]: https://github.com/domenic/sinon-chai

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