mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Port browser tree to React. Fixes #6129
This commit is contained in:
committed by
Akshay Joshi
parent
d983225683
commit
483e2ca8d0
@@ -15,7 +15,7 @@ describe('#nodeHasStatistics', () => {
|
||||
const node = {
|
||||
hasStatistics: true,
|
||||
};
|
||||
expect(nodeHasStatistics(node, {})).toEqual(true);
|
||||
expect(nodeHasStatistics({}, node, {})).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -24,12 +24,16 @@ describe('#nodeHasStatistics', () => {
|
||||
it('returns true', () => {
|
||||
const node = {
|
||||
hasStatistics: () => true,
|
||||
getTreeNodeHierarchy: jasmine.createSpy(),
|
||||
};
|
||||
const pgBrowser = {
|
||||
tree: {
|
||||
getTreeNodeHierarchy: jasmine.createSpy(),
|
||||
}
|
||||
};
|
||||
const item = {};
|
||||
|
||||
expect(nodeHasStatistics(node, item)).toEqual(true);
|
||||
expect(node.getTreeNodeHierarchy).toHaveBeenCalledWith(item);
|
||||
expect(nodeHasStatistics(pgBrowser, node, item)).toEqual(true);
|
||||
expect(pgBrowser.tree.getTreeNodeHierarchy).toHaveBeenCalledWith(item);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user