schnee effeckt und fehler Korektur

This commit is contained in:
2023-08-14 17:52:24 +02:00
parent 4a843d4936
commit 79af4e9907
6813 changed files with 343821 additions and 356128 deletions

9
node_modules/resolve/test/core.js generated vendored
View File

@@ -1,7 +1,11 @@
var test = require('tape');
var keys = require('object-keys');
var semver = require('semver');
var resolve = require('../');
var brokenNode = semver.satisfies(process.version, '11.11 - 11.13');
test('core modules', function (t) {
t.test('isCore()', function (st) {
st.ok(resolve.isCore('fs'));
@@ -22,10 +26,13 @@ test('core modules', function (t) {
for (var i = 0; i < cores.length; ++i) {
var mod = cores[i];
// note: this must be require, not require.resolve, due to https://github.com/nodejs/node/issues/43274
var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func
console.log(mod, resolve.core, resolve.core[mod]);
t.comment(mod + ': ' + resolve.core[mod]);
if (resolve.core[mod]) {
st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw');
} else if (brokenNode) {
st.ok(true, 'this version of node is broken: attempting to require things that fail to resolve breaks "home_paths" tests');
} else {
st.throws(requireFunc, mod + ' not supported; requiring throws');
}