Skip to content

Commit

Permalink
NAS-133774: Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
denysbutenko committed Feb 11, 2025
1 parent 862a787 commit 9e39dc8
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/app/services/filesystem.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,24 @@ describe('FilesystemService', () => {
it('check for updating the tree', async () => {
const treeNodeProvider = spectator.service.getFilesystemNodeProvider({ datasetsAndZvols: true });

const childNodes = await lastValueFrom(
treeNodeProvider({
data: {
path: '/mnt/parent',
await lastValueFrom(treeNodeProvider({
data: {
path: '/mnt/parent',
},
} as TreeNode<ExplorerNodeData>));

expect(spectator.inject(ApiService).call).toHaveBeenCalledWith(
'filesystem.listdir',
[
'/mnt/parent',
[],
{
select: ['attributes', 'is_ctldir', 'name', 'path', 'type'],
order_by: ['name'],
limit: 1000,
},
} as TreeNode<ExplorerNodeData>),
],
);

expect(spectator.inject(ApiService).call).toHaveBeenCalledWith('filesystem.listdir', childNodes);
});
});
});

0 comments on commit 9e39dc8

Please sign in to comment.