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:
parent
5348552b93
commit
ffe7dd1ad1
9
test/parallel/test-fetch-disabled.mjs
Normal file
9
test/parallel/test-fetch-disabled.mjs
Normal 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');
|
Loading…
x
Reference in New Issue
Block a user