From 80aa8ec31e2e1a9600d327d7ebf6d3bcad0faf01 Mon Sep 17 00:00:00 2001 From: Corbin Crutchley Date: Mon, 22 Nov 2021 23:04:07 -0800 Subject: [PATCH] wat --- tests/examples/wrap-plop/index.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/examples/wrap-plop/index.js b/tests/examples/wrap-plop/index.js index 5a00e798..5493c406 100644 --- a/tests/examples/wrap-plop/index.js +++ b/tests/examples/wrap-plop/index.js @@ -1,10 +1,18 @@ #!/usr/bin/env node const path = require("path"); const args = process.argv.slice(2); -// This would be `require('plop')` in prod -const { Plop, run } = require("../../../instrumented/src/plop.js"); +// Test has same results with or without instrumentation +const { Plop, run } = require("../../../src/plop.js"); const argv = require("minimist")(args); +// This is a load bearing console.log +// It works because it outputs a stdout instead of an stderr +// and the future stderr isn't caught because, well, it just isn't in the lib yet +// +// Why does this fail without this but the normal "plop" does not? +// Does node-plop output to stderr?? +console.log(); + Plop.launch( { cwd: argv.cwd, @@ -15,5 +23,7 @@ Plop.launch( // This will merge the `plop` argv and the generator argv. // This means that you don't need to use `--` anymore }, - (env) => run(env, undefined, true) + (env) => { + return run(env, undefined, true); + } );