open-index/open-npm huggingface dataset:
npm package: @piets/homebridge-samsung-tizen
Description: Samsung TV plugin for Homebridge
Author: Peter Kraml
Latest version: 0.1.6

# @piets/homebridge-samsung-tizen
This is a fork of [homebridge-samsung-tizen](https://github.com/tavicu/homebridge-samsung-tizen) plugin for [homebridge](https://github.com/nfarina/homebridge).
It allows you to control your Samsung TV with HomeKit and Siri.

In addition to all the features from upstream this plugin provides a special handling of the TVs volume. Volume is set via a JSON interface to an Arduino.  
Additionally a Lightbulb service acts as a sort of "volume slider".
npm package: @pietvanzoen/jasmine-promise-matchers
Description: Adds toResolve and toReject matchers for jasmine.
Author: hi@pietvanzoen.com
Latest version: 0.2.1

Promise Matchers
===

[![CircleCI branch](https://img.shields.io/circleci/project/github/pietvanzoen/jasmine-promise-matchers/master.svg?style=flat-square)](https://circleci.com/gh/pietvanzoen/jasmine-promise-matchers/tree/master)

Adds `toResolve` and `toReject` matchers to jasmine.

## Installation

```bash
$ npm install --save-dev @pietvanzoen/jasmine-promise-matchers
```

## Usage

Install the promise matchers using the `install` method.
```js
var promiseMatchers = require('@pietvanzoen/jasmine-promise-matchers');

beforeEach(function() {
  promiseMatchers.install(jasmine);
});
```

When using a non-native implementation of promises you can pass your `Promise` constructor as an option.
```js
var promiseMatchers = require('@pietvanzoen/jasmine-promise-matchers');
var RSVP = require('rsvp');

beforeEach(function() {
  promiseMatchers.install({
    jasmine: jasmine,
    Promise: RSVP.Promise
  });
});

```

### toResolve

```js
it('passes when promise resolves', function(done) {
  expect(Promise.resolve()).toResolve(done); // PASS
});
```

```js
it('fails when promise rejects', function(done) {
  expect(Promise.reject()).toResolve(done); // FAIL
});
```

### toReject

```js
it('passes when promise rejects', function(done) {
  expect(Promise.reject()).toReject(done); // PASS
});
```

```js
it('fails when promise resolves', function(done) {
  expect(Promise.resolve()).toReject(done); // FAIL
});
```

### callbacks

```js
it('passes promise response to callback', function(done) {
  expect(Promise.resolve('foo bar')).toResolve(done, function(resp) {
    expect(resp).toBe('foo bar'); // PASS
  });
});
```

#### callback returning a promise

```js
it('callback can return a promise', function(done) {
  expect(Promise.resolve('foo bar')).toResolve(done, function(resp) {
    return Promise.resolve()
      .then(function() {
        // `done` is not called until this promise chain completes
      });
  })
});
```

```js
it('fails when callback promise rejects', function(done) {
  expect(Promise.resolve('foo bar')).toResolve(done, function(resp) {
    return Promise.resolve()
      .then(function() {
        throw new Error('foo');
      }); // FAILS and reports Error
  })
});
```

## TODO
- [ ] Test and implement for browser environments.
- [x] Allow injection of custom `Promise` library.
- [ ] Use jasmines `addMatchers` function to install

## Contributing

Don't be shy! Submit issues (or better yet PRs) if you see anything that could be better. If you're submitting code that contains patches or features please try to include unit tests. Thanks!

## Author

Piet van Zoen hi@pietvanzoen.com

## License

MIT : http://opensource.org/licenses/MIT