Skip to content

Commit

Permalink
Stub out test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhanson committed Jan 18, 2014
1 parent 2114717 commit cf8dc9f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
@@ -1,5 +1,5 @@
SOURCES ?= lib/*.js
TESTS ?= test/*.test.js
SOURCES ?= lib/*.js lib/**/*.js
TESTS ?= test/*.test.js test/**/*.test.js

test: test-mocha
test-cov: test-istanbul-mocha
Expand Down
17 changes: 17 additions & 0 deletions test/exchange/chain.test.js
@@ -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');
});

});
7 changes: 4 additions & 3 deletions test/package.test.js
@@ -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');
});

});

0 comments on commit cf8dc9f

Please sign in to comment.