From de96c6a160221bc1b3f8611bb77f369edaef2c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 18 Feb 2022 16:46:22 +0100 Subject: [PATCH] test: check that fetch globals are disabled by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/42015 Reviewed-By: Antoine du Hamel Reviewed-By: Richard Lau Reviewed-By: Mestery Reviewed-By: Tobias Nießen Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Akhil Marsonya --- test/parallel/test-fetch-disabled.mjs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/parallel/test-fetch-disabled.mjs diff --git a/test/parallel/test-fetch-disabled.mjs b/test/parallel/test-fetch-disabled.mjs new file mode 100644 index 00000000000000..839cdf8f2ac947 --- /dev/null +++ b/test/parallel/test-fetch-disabled.mjs @@ -0,0 +1,9 @@ +import '../common/index.mjs'; + +import assert from 'assert'; + +assert.strictEqual(typeof globalThis.fetch, 'undefined'); +assert.strictEqual(typeof globalThis.FormData, 'undefined'); +assert.strictEqual(typeof globalThis.Headers, 'undefined'); +assert.strictEqual(typeof globalThis.Request, 'undefined'); +assert.strictEqual(typeof globalThis.Response, 'undefined');