mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
e890344d18
PR-URL: https://github.com/nodejs/node/pull/18018 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
20 lines
386 B
JavaScript
20 lines
386 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const fs = require('fs');
|
|
|
|
{
|
|
const s = fs.createReadStream(__filename);
|
|
|
|
s.close(common.mustCall());
|
|
s.close(common.mustCall());
|
|
}
|
|
|
|
{
|
|
const s = fs.createReadStream(__filename);
|
|
|
|
// this is a private API, but it is worth testing. close calls this
|
|
s.destroy(null, common.mustCall());
|
|
s.destroy(null, common.mustCall());
|
|
}
|