Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Commit

Permalink
add tests for PR #4
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelcontento committed Feb 29, 2016
1 parent 775037e commit 69a2106
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/__tests__/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ describe('engine', () => {
spy.should.have.been.calledWith({ key: 'value' });
});

it('should pass the result of .then forward', () => {
const engine = localStorageFakePromise('key');
const spy = sinon.spy();

engine.load().then(() => 'nextValue').then(spy);

spy.should.have.been.calledWith('nextValue');
});

it('should support then without a callback', () => {
const engine = localStorageFakePromise('foo');

Expand Down

0 comments on commit 69a2106

Please sign in to comment.