From 680a171efadb8ea3e0292ac5214d41d34449e922 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 20 May 2018 10:08:45 -0400 Subject: [PATCH] test: define SharedArrayBuffer as a known global MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit defines SharedArrayBuffer as a global for all tests, rather than adding comments to individual tests. PR-URL: https://github.com/nodejs/node/pull/20849 Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Ruben Bridgewater Reviewed-By: Yuta Hiroto Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Benjamin Gruenbaum Reviewed-By: Tobias Nießen --- test/.eslintrc.yaml | 1 + test/parallel/test-buffer-sharedarraybuffer.js | 1 - test/parallel/test-util-format-shared-arraybuffer.js | 2 -- test/parallel/test-util-types.js | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/test/.eslintrc.yaml b/test/.eslintrc.yaml index f07dd076d93865..7f67df154a9b35 100644 --- a/test/.eslintrc.yaml +++ b/test/.eslintrc.yaml @@ -51,3 +51,4 @@ globals: WebAssembly: false BigInt64Array: false BigUint64Array: false + SharedArrayBuffer: false diff --git a/test/parallel/test-buffer-sharedarraybuffer.js b/test/parallel/test-buffer-sharedarraybuffer.js index ce3241ec0e7a0f..52cec6e9c5cd1a 100644 --- a/test/parallel/test-buffer-sharedarraybuffer.js +++ b/test/parallel/test-buffer-sharedarraybuffer.js @@ -1,4 +1,3 @@ -/* global SharedArrayBuffer */ 'use strict'; require('../common'); diff --git a/test/parallel/test-util-format-shared-arraybuffer.js b/test/parallel/test-util-format-shared-arraybuffer.js index c910c1f1b4e044..27dfad3c91fd16 100644 --- a/test/parallel/test-util-format-shared-arraybuffer.js +++ b/test/parallel/test-util-format-shared-arraybuffer.js @@ -2,7 +2,5 @@ require('../common'); const assert = require('assert'); const util = require('util'); - -/* global SharedArrayBuffer */ const sab = new SharedArrayBuffer(4); assert.strictEqual(util.format(sab), 'SharedArrayBuffer { byteLength: 4 }'); diff --git a/test/parallel/test-util-types.js b/test/parallel/test-util-types.js index 924869896869c0..24f613cc0b25ad 100644 --- a/test/parallel/test-util-types.js +++ b/test/parallel/test-util-types.js @@ -1,5 +1,4 @@ // Flags: --harmony-bigint --experimental-vm-modules -/* global SharedArrayBuffer */ 'use strict'; const common = require('../common'); const fixtures = require('../common/fixtures');