Skip to content

Commit

Permalink
wat
Browse files Browse the repository at this point in the history
  • Loading branch information
crutchcorn committed Nov 23, 2021
1 parent 01452aa commit 80aa8ec
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions 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,
Expand All @@ -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);
}
);

0 comments on commit 80aa8ec

Please sign in to comment.