neume-network / core

A socially-scalable music NFT indexer.
https://neume.network
GNU General Public License v3.0
26 stars 11 forks source link

unskip and fix mysteriously failing directory test #31

Closed TimDaub closed 2 years ago

TimDaub commented 2 years ago

https://github.com/music-os/music-os-core/blob/170fadfdcd2389eb4fa5e66ad51698f2fa582fe9/test/disc_test.mjs#L19

naiknareshh commented 2 years ago

unlink() is used to delete a file, to remove an empty folder we will have to use rmdir()

try {
    await unlink(nonExistentDir);
  } catch (err) {
    console.error(err);
    t.fail();
  }

This test passes if we use rmdir() , let me know if you have any suggestions.

TimDaub commented 2 years ago

unlink() is used to delete a file, to remove an empty folder we will have to use rmdir()

Oh awesome, I wasn't aware of this. Thanks for helping out. @naiknareshh, are you interested in sending a PR?