async-iterable-stream
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -5,3 +5,3 @@ const MUST_OVERRIDE_METHOD_MESSAGE = 'Method must be overriden by subclass'; | ||
next() { | ||
throw new TypeError(MUST_OVERRIDE_METHOD_MESSAGE); | ||
return this.createAsyncIterator().next(); | ||
} | ||
@@ -8,0 +8,0 @@ |
{ | ||
"name": "async-iterable-stream", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "A readable async stream which can be iterated over using a for-await-of loop.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -54,14 +54,2 @@ const AsyncIterableStream = require('../index'); | ||
it('should throw error if next() is invoked directly on the abstract class', async () => { | ||
let result; | ||
let error; | ||
try { | ||
result = abstractStream.next(); | ||
} catch (err) { | ||
error = err; | ||
} | ||
assert.equal(error.name, 'TypeError'); | ||
assert.equal(error.message, 'Method must be overriden by subclass'); | ||
}); | ||
it('should throw error if createAsyncIterator() is invoked directly on the abstract class', async () => { | ||
@@ -68,0 +56,0 @@ let result; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7375
131