node-fs-extra fork with Pythagora tests
June 7, 2023 ยท View on GitHub
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
-
areIdenticalreturnsundefinedinstead offalseif 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); }); -
isSrcSubdirsays/test/srcis subfolder of itself:test('should return false if dest is the same as src', () => { expect(isSrcSubdir('/test/src', '/test/src')).toBe(false); });