ttsukagoshi / csv2gsheets

CLI tool to convert local CSV files into Google Sheets files in a designated Google Drive folder. Users can choose whether to update an existing Sheets file, or create a new one.
https://www.npmjs.com/package/csv2gsheets
MIT License
3 stars 0 forks source link

Fix test errors in `postbuild.test.ts` #101

Closed ttsukagoshi closed 9 months ago

ttsukagoshi commented 9 months ago

TypeError: Cannot read properties of undefined (reading 'forEach')

   19 | export function findJsFiles(dir, jsFileList = []) {
   20 |   const files = fs.readdirSync(dir, { withFileTypes: true });
 > 21 |   files.forEach((fileDirent) => {
      |         ^
   22 |     const filePath = path.join(dir, fileDirent.name);
   23 |     const extName = path.extname(filePath);
   24 |     if (fileDirent.isDirectory()) {

   at findJsFiles (postbuild/postbuild.mjs:21:9)
   at postbuild (postbuild/postbuild.mjs:87:22)
   at Object.<anonymous> (postbuild/postbuild.mjs:102:1)
   at Object.<anonymous> (test/postbuild.test.ts:1:1)