Skip to content

Commit

Permalink
test: add a SharedArrayBuffer worker test
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Sep 2, 2021
1 parent 7c3ed50 commit 9ff558a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/parallel/test-worker-no-sab.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Flags: --no-harmony-sharedarraybuffer

'use strict';

const common = require('../common');
const assert = require('assert');
const { isMainThread, Worker } = require('worker_threads');

// Regression test for https://github.com/nodejs/node/issues/39717.

const w = new Worker(__filename);

w.on('exit', common.mustCall((status) => {
assert.strictEqual(status, 2);
}));

if (!isMainThread) process.exit(2);

0 comments on commit 9ff558a

Please sign in to comment.