| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9d3699b commit 57d7bbf
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -64,7 +64,7 @@ ObjectDefineProperty(globalThis, 'fetch', { | |||
| 64 | 64 | configurable: true, | |
| 65 | 65 | enumerable: true, | |
| 66 | 66 | writable: true, | |
| 67 | - value: function value(input, init = undefined) { | ||
| 67 | + value: function fetch(input, init = undefined) { // eslint-disable-line func-name-matching | ||
| 68 | 68 | if (!fetchImpl) { // Implement lazy loading of undici module for fetch function | |
| 69 | 69 | const undiciModule = require('internal/deps/undici/undici'); | |
| 70 | 70 | fetchImpl = undiciModule.fetch; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -60,6 +60,14 @@ for (const moduleName of builtinModules) { | |||
| 60 | 60 | 'crypto', | |
| 61 | 61 | ]; | |
| 62 | 62 | assert.deepStrictEqual(new Set(Object.keys(global)), new Set(expected)); | |
| 63 | + expected.forEach((value) => { | ||
| 64 | + const desc = Object.getOwnPropertyDescriptor(global, value); | ||
| 65 | + if (typeof desc.value === 'function') { | ||
| 66 | + assert.strictEqual(desc.value.name, value); | ||
| 67 | + } else if (typeof desc.get === 'function') { | ||
| 68 | + assert.strictEqual(desc.get.name, `get ${value}`); | ||
| 69 | + } | ||
| 70 | + }); | ||
| 63 | 71 | } | |
| 64 | 72 | ||
| 65 | 73 | common.allowGlobals('bar', 'foo'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments