From 98b34c6c0f817e9eda2732b6237b9e6f0d044fbc Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Thu, 9 Feb 2017 17:04:05 +0000 Subject: [PATCH] Document helper precompilation caveat (in code at least) --- api.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api.js b/api.js index 160776ce4..16052f3bc 100644 --- a/api.js +++ b/api.js @@ -119,6 +119,11 @@ class Api extends EventEmitter { _precompileHelpers() { this._precompiledHelpers = {}; + // Assumes the tests only load helpers from within the `resolveTestsFrom` + // directory. Without arguments this is the `projectDir`, else it's + // `process.cwd()` which may be nested too deeply. This will be solved + // as we implement RFC 001 and move helper compilation into the worker + // processes, avoiding the need for precompilation. return new AvaFiles({cwd: this.options.resolveTestsFrom}) .findTestHelpers() .map(file => { // eslint-disable-line array-callback-return