diff options
Diffstat (limited to 'tests/testdata/npm/registry/@denotest/child-process-fork')
3 files changed, 27 insertions, 0 deletions
diff --git a/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/forked_path.js b/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/forked_path.js new file mode 100644 index 000000000..aaa106315 --- /dev/null +++ b/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/forked_path.js @@ -0,0 +1,3 @@ +const chalk = require("chalk"); + +console.log(typeof chalk.green); diff --git a/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/index.js b/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/index.js new file mode 100644 index 000000000..0482be404 --- /dev/null +++ b/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/index.js @@ -0,0 +1,20 @@ +const path = require("path"); + +function childProcessFork(path) { + const command = new Deno.Command(Deno.execPath(), { + args: ["run", "-A", path], + env: { + "DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE": Deno[Deno.internal].core.ops.op_npm_process_state(), + } + }); + const child = command.spawn(); + child.status.then(() => { + console.log("Done."); + }); +} + +module.exports = { + run() { + childProcessFork(path.join(__dirname, "forked_path.js")); + } +}; diff --git a/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/package.json b/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/package.json new file mode 100644 index 000000000..9ab14e3f7 --- /dev/null +++ b/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/package.json @@ -0,0 +1,4 @@ +{ + "name": "@denotest/child-process-fork", + "version": "1.0.0" +} |
