mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
test: add known issue tests for fs.cp
PR-URL: https://github.com/nodejs/node/pull/58883 Refs: https://github.com/nodejs/node/issues/58634 Refs: https://github.com/nodejs/node/issues/58869 Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Jason Zhang <xzha4350@gmail.com> Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
f69f90d97a
commit
2022f832a9
3 changed files with 111 additions and 0 deletions
23
test/known_issues/test-fs-cp-async-buffer.js
Normal file
23
test/known_issues/test-fs-cp-async-buffer.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
// We expect this test to fail because the implementation of fsPromise.cp
|
||||
// does not properly support the use of Buffer as the source or destination
|
||||
// argument like fs.cpSync does.
|
||||
// Refs: https://github.com/nodejs/node/issues/58634
|
||||
// Refs: https://github.com/nodejs/node/issues/58869
|
||||
|
||||
const common = require('../common');
|
||||
const { mkdirSync, promises } = require('fs');
|
||||
const { join } = require('path');
|
||||
const tmpdir = require('../common/tmpdir');
|
||||
|
||||
tmpdir.refresh();
|
||||
|
||||
const tmpA = join(tmpdir.path, 'a');
|
||||
const tmpB = join(tmpdir.path, 'b');
|
||||
|
||||
mkdirSync(tmpA, { recursive: true });
|
||||
|
||||
promises.cp(Buffer.from(tmpA), Buffer.from(tmpB), {
|
||||
recursive: true,
|
||||
}).then(common.mustCall());
|
Loading…
Add table
Add a link
Reference in a new issue