Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2114717
commit cf8dc9f
Showing
3 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var chai = require('chai') | ||
, chain = require('../../lib/exchange/chain'); | ||
|
||
|
||
describe('exchange.chain', function() { | ||
|
||
it('should be named chain', function() { | ||
expect(chain(function(){}).name).to.equal('chain'); | ||
}); | ||
|
||
it('should throw if constructed without an issue callback', function() { | ||
expect(function() { | ||
chain(); | ||
}).to.throw(TypeError, 'chain exchange requires an issue callback'); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
/* global describe, it, expect */ | ||
|
||
var pkg = require('..'); | ||
var chain = require('..'); | ||
|
||
describe('oauth2orize-chain', function() { | ||
|
||
it('should export object', function() { | ||
expect(pkg).to.be.an('object'); | ||
it('should export exchanges', function() { | ||
expect(chain.exchange).to.be.an('object'); | ||
expect(chain.exchange.chain).to.be.a('function'); | ||
}); | ||
|
||
}); |