botbuilder-utils-js
botbuilder-utils-js copied to clipboard
Figure out way to automate finding the correct playback directory
As of now, we're instructing our users to always construct HttpTestPlayback with 'testDataDirectory', otherwise it defaults to, for example: C:\microsoft\repos\bots\samples\testplayback\javascript\node_modules\mocha\bin\test\data\
However, it might be nice if an empty constructor could be used, and the code defaults to the directory of the project, not 'node_modules\mocha\bin'.
I think we can take a trial and error approach:
- look in current directory
- look in root package directory (gets weird when mocha is invoked on command line)
- keep looking in parent directory until parents are exhausted