node/test/fixtures/worker-data.cjs
Antoine du HAMEL 611a158f1a
worker: add support for .cjs extension
PR-URL: https://github.com/nodejs/node/pull/31662
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2020-02-13 21:32:01 +01:00

4 lines
99 B
JavaScript

const { workerData, parentPort } = require('worker_threads');
parentPort.postMessage(workerData);