This PR can be summarized in the following changelog entry:
[not-user-facing] Adds a TreeResearcher (Treesearcher?) that can apply researches to trees as parsed by the new tree builder functionality.
Relevant technical choices:
Also adds a simple test research (spec/specHelpers/tree/TestResearch.js) that's used in the tests. It just splits each text on whitespace and counts the resulting tokens.
Test instructions
This PR can be tested by following these steps:
Checkout this branch locally.
Run yarn test, check if the coverage of all the files in the tree subfolder is 100%.
Run grunt check, check if the code added by this PR (TreeResearcher, Research, TreeResearchSpec, TestResearch, ResearchSpec and to Node) does not lead to any eslint warnings.
Take a look at the code and tests. Check if any (edge) cases are not tested yet and/or you see any issues in the code that may lead to problems in the future.
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
spec/specHelpers/tree/TestResearch.js
) that's used in the tests. It just splits each text on whitespace and counts the resulting tokens.Test instructions
This PR can be tested by following these steps:
yarn test
, check if the coverage of all the files in thetree
subfolder is 100%.grunt check
, check if the code added by this PR (TreeResearcher
,Research
,TreeResearchSpec
,TestResearch
,ResearchSpec
and toNode
) does not lead to any eslint warnings.Fixes #2080