chai-oauth2orize-grant
Advanced tools
Comparing version 0.2.1 to 0.3.0
@@ -137,6 +137,7 @@ /** | ||
*/ | ||
Test.prototype.decide = function(err) { | ||
Test.prototype.decide = function(complete) { | ||
var self = this | ||
, txn = { protocol: 'oauth2' } | ||
, before = this._txn; | ||
, before = this._txn | ||
, complete = complete || function(cb){ return cb(); } | ||
@@ -157,3 +158,8 @@ function ready() { | ||
var fn = self._mod.response; | ||
fn(txn, res, next); | ||
var arity = fn.length; | ||
if (arity == 4) { | ||
fn(txn, res, complete, next); | ||
} else { | ||
fn(txn, res, next); | ||
} | ||
} | ||
@@ -160,0 +166,0 @@ |
{ | ||
"name": "chai-oauth2orize-grant", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "Helpers for testing OAuth2orize grants with the Chai assertion library.", | ||
@@ -23,14 +23,15 @@ "keywords": [ | ||
}, | ||
"license": "MIT", | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "http://www.opensource.org/licenses/MIT" | ||
"url": "http://opensource.org/licenses/MIT" | ||
} | ||
], | ||
"main": "./lib", | ||
"dependencies": { | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"make-node": "0.3.x", | ||
"mocha": "1.x.x", | ||
"chai": "1.x.x" | ||
"chai": "2.x.x" | ||
}, | ||
@@ -37,0 +38,0 @@ "engines": { |
# chai-oauth2orize-grant | ||
[![Build](https://travis-ci.org/jaredhanson/chai-oauth2orize-grant.png)](https://travis-ci.org/jaredhanson/chai-oauth2orize-grant) | ||
[![Coverage](https://coveralls.io/repos/jaredhanson/chai-oauth2orize-grant/badge.png)](https://coveralls.io/r/jaredhanson/chai-oauth2orize-grant) | ||
[![Quality](https://codeclimate.com/github/jaredhanson/chai-oauth2orize-grant.png)](https://codeclimate.com/github/jaredhanson/chai-oauth2orize-grant) | ||
[![Dependencies](https://david-dm.org/jaredhanson/chai-oauth2orize-grant.png)](https://david-dm.org/jaredhanson/chai-oauth2orize-grant) | ||
[![Build](https://img.shields.io/travis/jaredhanson/chai-oauth2orize-grant.svg)](https://travis-ci.org/jaredhanson/chai-oauth2orize-grant) | ||
[![Coverage](https://img.shields.io/coveralls/jaredhanson/chai-oauth2orize-grant.svg)](https://coveralls.io/r/jaredhanson/chai-oauth2orize-grant) | ||
[![Quality](https://img.shields.io/codeclimate/github/jaredhanson/chai-oauth2orize-grant.svg?label=quality)](https://codeclimate.com/github/jaredhanson/chai-oauth2orize-grant) | ||
[![Dependencies](https://img.shields.io/david/jaredhanson/chai-oauth2orize-grant.svg)](https://david-dm.org/jaredhanson/chai-oauth2orize-grant) | ||
@@ -28,3 +28,3 @@ | ||
#### Write Test Cases | ||
#### Implement Test Cases | ||
@@ -34,11 +34,38 @@ Once used, the `chai.oauth2orize.grant` helper function will be available to set | ||
## Tests | ||
## Contributing | ||
$ npm install | ||
$ npm test | ||
#### Tests | ||
## Credits | ||
The test suite is located in the `test/` directory. All new features are | ||
expected to have corresponding test cases. Ensure that the complete test suite | ||
passes by executing: | ||
- [Jared Hanson](http://github.com/jaredhanson) | ||
```bash | ||
$ make test | ||
``` | ||
#### Coverage | ||
All new feature development is expected to have test coverage. Patches that | ||
increse test coverage are happily accepted. Coverage reports can be viewed by | ||
executing: | ||
```bash | ||
$ make test-cov | ||
$ make view-cov | ||
``` | ||
## Support | ||
#### Funding | ||
This software is provided to you as open source, free of charge. The time and | ||
effort to develop and maintain this project is volunteered by [@jaredhanson](https://github.com/jaredhanson). | ||
If you (or your employer) benefit from this project, please consider a financial | ||
contribution. Your contribution helps continue the efforts that produce this | ||
and other open source software. | ||
Funds are accepted via [PayPal](https://paypal.me/jaredhanson), [Venmo](https://venmo.com/jaredhanson), | ||
and [other](http://jaredhanson.net/pay) methods. Any amount is appreciated. | ||
## License | ||
@@ -48,2 +75,2 @@ | ||
Copyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)> | ||
Copyright (c) 2013-2017 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10160
8
245
74
3