test: check that fetch globals are disabled by default

PR-URL: https://github.com/nodejs/node/pull/42015
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
This commit is contained in:
Michaël Zasso authored and Bryan English committed 2022-02-22 11:38:55 -05:00
1 parent c673953f6d
commit fe66d2b98c
1 file changed
+9
+9
View File
@@ -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');