@util.js/node-streams 0.41.0 → 0.41.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
 
3
- var Streams = require("./lib/Streams");
3
+ const Streams = require("./lib/Streams");
4
4
  module.exports = new Streams();
package/lib/Streams.js CHANGED
@@ -67,6 +67,7 @@ class Streams {
67
67
  * @function
68
68
  */
69
69
  newReadable() {
70
+ // eslint-disable-next-line new-cap
70
71
  return new stream().Readable(...arguments);
71
72
  }
72
73
 
@@ -90,6 +91,7 @@ class Streams {
90
91
  * @function
91
92
  */
92
93
  newWritable() {
94
+ // eslint-disable-next-line new-cap
93
95
  return new stream().Writable(...arguments);
94
96
  }
95
97
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "author": "Chris Topher <c@creemama.com>",
3
3
  "dependencies": {
4
- "@util.js/promises": "0.41.0",
5
- "@util.js/strings": "0.41.0"
4
+ "@util.js/promises": "0.41.2",
5
+ "@util.js/strings": "0.41.2"
6
6
  },
7
7
  "description": "JavaScript utility methods for streams",
8
8
  "keywords": [
@@ -27,6 +27,6 @@
27
27
  "type": "git",
28
28
  "url": "https://github.com/creemama/utiljs/tree/master/packages/utiljs-node-streams"
29
29
  },
30
- "version": "0.41.0",
31
- "gitHead": "1ae0fda34e06ffbc546c5ba0025b0b59a0c7727d"
30
+ "version": "0.41.2",
31
+ "gitHead": "174b81ec0ead0221b9bb6617bc254b025bd20a5a"
32
32
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
- const { expect } = require("chai"),
4
- stream = require("stream"),
5
- streams = require("..");
3
+ const { expect } = require("chai");
4
+ const stream = require("stream");
5
+ const streams = require("..");
6
6
 
7
7
  describe("Streams", () => {
8
8
  describe("#finished(stream[, callback])", () => {
@@ -63,19 +63,25 @@ describe("Streams", () => {
63
63
  () => {
64
64
  throw new Error("Unexpected success");
65
65
  },
66
- (error) => {}
66
+ (error) => {
67
+ if (!error) throw new Error("Unexpected");
68
+ }
67
69
  );
68
70
  await streams.stringify(null).then(
69
71
  () => {
70
72
  throw new Error("Unexpected success");
71
73
  },
72
- (error) => {}
74
+ (error) => {
75
+ if (!error) throw new Error("Unexpected");
76
+ }
73
77
  );
74
78
  await streams.stringify(null, null).then(
75
79
  () => {
76
80
  throw new Error("Unexpected success");
77
81
  },
78
- (error) => {}
82
+ (error) => {
83
+ if (!error) throw new Error("Unexpected");
84
+ }
79
85
  );
80
86
  });
81
87
  it("should successfully stringify a Readable and notify a callback", (callback) => {