Skip to content

Commit

Permalink
streamich#735 - fix tests for parentPath property
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulKa committed Sep 17, 2024
1 parent ad20e48 commit ea54d9f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/__tests__/volume/readdirSync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ describe('readdirSync()', () => {
return { ...dirent };
});
expect(mapped).toEqual([
{ mode: 33206, name: 'af', path: '/x' },
{ mode: 16895, name: 'b', path: '/x' },
{ mode: 16895, name: 'c', path: '/x' },
{ mode: 33206, name: 'af', path: '/x', parentPath: '/x' },
{ mode: 16895, name: 'b', path: '/x', parentPath: '/x' },
{ mode: 16895, name: 'c', path: '/x', parentPath: '/x' },
]);
});

Expand Down Expand Up @@ -105,16 +105,16 @@ describe('readdirSync()', () => {
})
.sort((a, b) => a.path.localeCompare(b.path));
expect(mapped).toEqual([
{ mode: 33206, name: 'af1', path: '/z' },
{ mode: 33206, name: 'af2', path: '/z' },
{ mode: 16895, name: 'b', path: '/z' },
{ mode: 16895, name: 'c', path: '/z' },
{ mode: 33206, name: 'bf1', path: '/z/b' },
{ mode: 33206, name: 'bf2', path: '/z/b' },
{ mode: 16895, name: 'c', path: '/z/c' },
{ mode: 33206, name: '.cf0', path: '/z/c/c' },
{ mode: 33206, name: 'cf1', path: '/z/c/c' },
{ mode: 33206, name: 'cf2', path: '/z/c/c' },
{ mode: 33206, name: 'af1', path: '/z', parentPath: '/z' },
{ mode: 33206, name: 'af2', path: '/z', parentPath: '/z' },
{ mode: 16895, name: 'b', path: '/z', parentPath: '/z' },
{ mode: 16895, name: 'c', path: '/z', parentPath: '/z' },
{ mode: 33206, name: 'bf1', path: '/z/b', parentPath: '/z/b' },
{ mode: 33206, name: 'bf2', path: '/z/b', parentPath: '/z/b' },
{ mode: 16895, name: 'c', path: '/z/c', parentPath: '/z/c' },
{ mode: 33206, name: '.cf0', path: '/z/c/c', parentPath: '/z/c/c' },
{ mode: 33206, name: 'cf1', path: '/z/c/c', parentPath: '/z/c/c' },
{ mode: 33206, name: 'cf2', path: '/z/c/c', parentPath: '/z/c/c' },
]);
});
});

0 comments on commit ea54d9f

Please sign in to comment.