Skip to content

Commit

Permalink
Added new test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Jul 10, 2017
1 parent 2ee2e93 commit ec6146b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/client_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import {expect} from 'chai';
import {describe, it} from 'mocha';
import {Observable} from 'rxjs/Observable';
import {Subject} from 'rxjs/Subject';
import {URL} from 'url';
import {Author, Client, Comment, CommentType} from '../src/index';

Expand Down Expand Up @@ -40,6 +42,28 @@ describe('Client', function() {
});
});

/**
* @test {Client#onRequest}
*/
describe('#onRequest', () => {
it('should return an `Observable` instead of the underlying `Subject`', () => {
let stream = new Client().onRequest;
expect(stream).to.be.instanceof(Observable);
expect(stream).to.not.be.instanceof(Subject);
});
});

/**
* @test {Client#onResponse}
*/
describe('#onResponse', () => {
it('should return an `Observable` instead of the underlying `Subject`', () => {
let stream = new Client().onResponse;
expect(stream).to.be.instanceof(Observable);
expect(stream).to.not.be.instanceof(Subject);
});
});

/**
* @test {Client#submitHam}
*/
Expand Down

0 comments on commit ec6146b

Please sign in to comment.