Hello and thanks for taking the time to take this test !
Please do not use ChatGpt, Github Copilot or any equivalent.
The app shows a tree view of files and folder ; however it shows nothing for now.
Tree node are of TreeNode type
interface TreeNode {
  name: string;
  children?: TreeNode[];
  hidden?: boolean;
}- Run npm ito install all dependencies.
- Run npm run devto start dev server and mocked services.
Run npm run test:filterHiddenFiles run only filterHiddenFiles.test.ts.
Run npm run test:all run all units tests in watch mode.
In filterHiddenFiles.ts and filterHiddenFiles.test.ts, the test for the function filterHiddenFiles fails
You are asked to fix the function so the test succeeds.
For this step, please considerate <TreeView> as a component coming from a 3rd party library. It should not be edited.
- Build useQueryTreeDatahook to fetch http://localhost:5173/tree. Its return type should match the providedUseQueryTreeDataReturn.
 No worries, the endpoint is already handled via a mocked API service.
- Use the query hook in App.tsxto inject the data into<TreeView>so the 1st test inapp.test.tssucceeds ("renders the tree data correctly").
- Use filterHiddenFilesto only display files that are not "hidden". Hence, the 2nd test inapp.test.tsshould succeed ("renders the tree with filtered data")'