Tests could be arbitrarily any depth after a root folder node. This means we would need to update a master file every time a new test is written when paths could change in an API endpoint. A more safe, but difficult approach is better, is searching the depth of the tree. We could also do a basic cache system of all the valid tests routes once discovered.
In node-js apps there is a lot of watch like functions. Lets see how they do this and see if we can add some of the principle aspects to detect new tests.
https://github.com/BNetTargetDummy/test-runner/blob/13ebf4a08fe4392a8d7b0c717287ceca5362f058/src/base.js#L32
Tests could be arbitrarily any depth after a root folder node. This means we would need to update a master file every time a new test is written when paths could change in an API endpoint. A more safe, but difficult approach is better, is searching the depth of the tree. We could also do a basic cache system of all the valid tests routes once discovered.
In node-js apps there is a lot of watch like functions. Lets see how they do this and see if we can add some of the principle aspects to detect new tests.