botbuilder-utils-js icon indicating copy to clipboard operation
botbuilder-utils-js copied to clipboard

Figure out way to automate finding the correct playback directory

Open roalexan opened this issue 7 years ago • 1 comments

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'.

roalexan avatar Sep 19 '18 16:09 roalexan

I think we can take a trial and error approach:

  1. look in current directory
  2. look in root package directory (gets weird when mocha is invoked on command line)
  3. keep looking in parent directory until parents are exhausted

ctstone avatar Sep 20 '18 14:09 ctstone