Skip to content

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()

License

Notifications You must be signed in to change notification settings

Pythagora-io/pythagora-demo-node-fs-extra

 
 

Repository files navigation

node-fs-extra fork with Pythagora tests

If you want to try it out yourself, just clone the repo and run:

npm i
npx jest ./pythagora_tests/

Bugs that Pythagora tests caught:

Edge cases

  1. areIdentical returns undefined instead of false if destStat is empty object:

     test('should return false if destStat is missing ino and/or dev properties', () => {
       const srcStat = fs.statSync(__filename);
       const destStat = {};
       const result = areIdentical(srcStat, destStat);
       expect(result).toBe(false);
    });
  2. isSrcSubdir says /test/src is subfolder of itself:

    test('should return false if dest is the same as src', () => {
      expect(isSrcSubdir('/test/src', '/test/src')).toBe(false);
    });

About

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%