Skip to content

Commit

Permalink
removed node 0.8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
donjuandem committed Jun 26, 2017
1 parent 4b468fd commit ca90542
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
11 changes: 6 additions & 5 deletions lib/__tests__/ExpectStreamTest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expect-stream",
"version": "0.1.1",
"version": "0.1.2",
"description": "chai extension for mocha stream tests",
"main": "index.js",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions src/__tests__/ExpectStreamTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import assert from "assert";
import sinon from "sinon";

class ReadStream extends Readable {
constructor(messages = "lala") {
super({ objectMode: true });
constructor(messages = "lala", objectMode = true) {
super({ objectMode });

this.messages = messages;
}
Expand Down Expand Up @@ -58,7 +58,7 @@ class TransformObjStream extends Transform {

describe("ExpectStreamTest", function() { // eslint-disable-line
it("uses the produce assertion with a readstream, matching exactly", function(done) {
expect(new ReadStream(["lala1", "lala2", "lala3"]))
expect(new ReadStream(["lala1", "lala2", "lala3"], false))
.to.produce(["lala1", "lala2", "lala3"])
.notify(done);
});
Expand Down Expand Up @@ -88,7 +88,7 @@ describe("ExpectStreamTest", function() { // eslint-disable-line
});

it("uses the produce assertion with a readstream, matching exactly and fails", function(done) {
const stream = new ReadStream(["lala1", "lala", "lala3"]);
const stream = new ReadStream(["lala1", "lala", "lala3"], false);

expect(stream)
.to.produce(["lala1", "lala2", "lala3"])
Expand All @@ -106,7 +106,7 @@ describe("ExpectStreamTest", function() { // eslint-disable-line
});

it("uses the produce assertion with a readstream, matching not exactly", function(done) {
const stream = new ReadStream(["lala1", "lala", "lala2", "lala3"]);
const stream = new ReadStream(["lala1", "lala", "lala2", "lala3"], false);

expect(stream)
.to.eventually.produce(["lala1", "lala2", "lala3"])
Expand All @@ -124,7 +124,7 @@ describe("ExpectStreamTest", function() { // eslint-disable-line
});

it("uses the produce assertion with a readstream, matching exactly, but filtering some messages", function(done) {
expect(new ReadStream(["lala1", "lala", "lala2", "lala3"]))
expect(new ReadStream(["lala1", "lala", "lala2", "lala3"], false))
.filter(value => value !== "lala")
.to.produce(["lala1", "lala2", "lala3"])
.notify(done);
Expand Down

0 comments on commit ca90542

Please sign in to comment.