We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33c1786 commit 5cd8cb6Copy full SHA for 5cd8cb6
test/parallel/test-stream-manualstart.js
@@ -0,0 +1,20 @@
1
+'use strict';
2
+const common = require('../common');
3
+const assert = require('assert');
4
+const fs = require('fs');
5
+
6
+fs.promises.open(__filename).then(common.mustCall((fd) => {
7
+ const rs = new fs.ReadStream(null, {
8
+ fd: fd,
9
+ manualStart: false
10
+ });
11
+ setTimeout(() => assert(rs.bytesRead > 0), common.platformTimeout(10));
12
+}));
13
14
15
16
17
+ manualStart: true
18
19
+ setTimeout(() => assert(rs.bytesRead === 0), common.platformTimeout(10));
20
0 commit comments