Skip to content

Commit

Permalink
Test adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxy-Loxy committed Nov 3, 2021
1 parent 9a4abb7 commit 9a17f52
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/content/streamContent.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {expect} from 'chai';
import {Readable, Writable} from 'stream';
import {StreamContent} from '../../src/content/streamContent';

Expand All @@ -8,15 +7,15 @@ describe('StreamContent', () => {

const content = new StreamContent(stream, 'text/plain');

expect(content.headers['content-type']).to.equal('text/plain');
expect(content.headers['content-type']).toEqual('text/plain');
});

it('should have streamed response flag', () => {
const stream = new Readable();

const content = new StreamContent(stream, 'text/plain');

expect(content.isStreamedResponse).to.equal(true);
expect(content.isStreamedResponse).toEqual(true);
});

it('should be able to pipe stream which was given to it', done => {
Expand All @@ -37,7 +36,7 @@ describe('StreamContent', () => {
readable.on('end', () => {
buffer = Buffer.concat(chunks);

expect(buffer.toString()).to.equal('test');
expect(buffer.toString()).toEqual('test');

done();
});
Expand Down

0 comments on commit 9a17f52

Please sign in to comment.