1+ import process from 'node:process' ;
12import path from 'node:path' ;
23import fs from 'node:fs' ;
34import crypto from 'node:crypto' ;
@@ -8,7 +9,7 @@ import proxyquire from 'proxyquire';
89import CpyError from './cpy-error.js' ;
910import cpy from './index.js' ;
1011
11- const read = ( ...args ) => fs . readFileSync ( path . join ( ...args ) , 'utf8' ) ;
12+ const read = ( ...arguments_ ) => fs . readFileSync ( path . join ( ...arguments_ ) , 'utf8' ) ;
1213
1314const cpyMockedError = module => proxyquire ( '.' , {
1415 [ module ] ( ) {
@@ -62,7 +63,7 @@ test('throws on invalid concurrency value', async t => {
6263
6364test ( 'copy array of files with filter' , async t => {
6465 await cpy ( [ 'license' , 'package.json' ] , t . context . tmp , {
65- filter : file => {
66+ filter ( file ) {
6667 if ( file . path . endsWith ( 'license' ) ) {
6768 t . is ( file . path , path . join ( process . cwd ( ) , 'license' ) ) ;
6869 t . is ( file . name , 'license' ) ;
@@ -85,7 +86,7 @@ test('copy array of files with filter', async t => {
8586
8687test ( 'copy array of files with async filter' , async t => {
8788 await cpy ( [ 'license' , 'package.json' ] , t . context . tmp , {
88- filter : async file => {
89+ async filter ( file ) {
8990 if ( file . path . endsWith ( `${ path . sep } license` ) ) {
9091 t . is ( file . path , path . join ( process . cwd ( ) , 'license' ) ) ;
9192 t . is ( file . name , 'license' ) ;
@@ -411,7 +412,7 @@ test('reports correct completedSize', async t => {
411412test ( 'returns the event emitter on early rejection' , t => {
412413 const rejectedPromise = cpy ( null , null ) ;
413414 t . is ( typeof rejectedPromise . on , 'function' ) ;
414- rejectedPromise . catch ( ( ) => { } ) ; // eslint-disable-line promise/prefer-await-to-then
415+ rejectedPromise . catch ( ( ) => { } ) ;
415416} ) ;
416417
417418test ( 'returns destination path' , async t => {
0 commit comments