function testProxyUrl(env, expected, input, options, testName) {
    assert(typeof env === 'object' && env !== null);
    // Copy object to make sure that the in param does not get modified between
    // the call of this function and the use of it below.
    env = JSON.parse(JSON.stringify(env));

    const title = testName || 'Proxy for URL ' + JSON.stringify(input) + ' === ' + JSON.stringify(expected);

    // Save call stack for later use.
    let stack = {};
    Error.captureStackTrace(stack, testProxyUrl);
    // Only use the last stack frame because that shows where this function is
    // called, and that is sufficient for our purpose. No need to flood the logs
    // with an uninteresting stack trace.
    stack = stack.stack.split('\n', 2)[1];

    it(title, function () {
        let actual;
        // runWithEnv(env, function () {
        //     actual = getProxyForUrl(input, options);
        // });
        options = options || {};
        options.env = options.env || env || process.env;
        actual = getProxyForUrl(input, options);
        if (expected === actual) {
            return;  // Good!
        }
        try {
            assert.strictEqual(expected, actual); // Create a formatted error message.
            // Should not happen because previously we determined expected !== actual.
            throw new Error('assert.strictEqual passed. This is impossible!');
        } catch (e) {
            // Use the original stack trace, so we can see a helpful line number.
            e.stack = e.message + stack;
            throw e;
        }
    });
}
Defines a test case that checks whether getProxyForUrl(input) === expected.
@param {object} env - The environment variables to use for the test
@param {*} expected - The expected result
@param {*} input - The input to test
@param {import('../../../../../packages/node_modules/@node-red/nodes/core/network/lib/proxyHelper').ProxyOptions} [options] - The options to use for getProxyForUrl
@param {string} [testName] - The name of the test (auto computed if not provided)