mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
66556f53a7
PR-URL: https://github.com/nodejs/node/pull/51526 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
17 lines
471 B
JavaScript
17 lines
471 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const { ok } = require('node:assert');
|
|
|
|
// This test verifies that cloned ReadableStream and WritableStream instances
|
|
// do not keep the process alive. The test fails if it timesout (it should just
|
|
// exit immediately)
|
|
|
|
const rs1 = new ReadableStream();
|
|
const ws1 = new WritableStream();
|
|
|
|
const [rs2, ws2] = structuredClone([rs1, ws1], { transfer: [rs1, ws1] });
|
|
|
|
ok(rs2 instanceof ReadableStream);
|
|
ok(ws2 instanceof WritableStream);
|