def pytest_generate_tests(metafunc: pytest.Metafunc) -> None:
    """Generate tests with WebAssembly JavaScript Promise Integration both
     enabled and disabled depending on browser/node.js support for features.
     Also drops any test that requires a browser or web-workers in Node.js.
    ).
    """
    if "has_jspi" in metafunc.fixturenames:
        can_run_with_jspi = False
        can_run_without_jspi = False
        # node only supports JSPI and doesn't support workers or
        # webbrowser specific tests
        if metafunc.config.getoption("--runtime").startswith("node"):
            if (
                metafunc.definition.get_closest_marker("webworkers") is None
                and metafunc.definition.get_closest_marker("in_webbrowser") is None
            ):
                can_run_with_jspi = True
            if metafunc.definition.get_closest_marker("node_without_jspi"):
                can_run_without_jspi = True
                can_run_with_jspi = False
        # firefox doesn't support JSPI
        elif metafunc.config.getoption("--runtime").startswith("firefox"):
            can_run_without_jspi = True
        else:
            # chrome supports JSPI on or off
            can_run_without_jspi = True
            can_run_with_jspi = True

        # if the function is marked to only run with or without jspi,
        # then disable the alternative option
        if metafunc.definition.get_closest_marker("with_jspi"):
            can_run_without_jspi = False
        elif metafunc.definition.get_closest_marker("without_jspi"):
            can_run_with_jspi = False

        jspi_options = []
        if can_run_without_jspi:
            jspi_options.append(False)
        if can_run_with_jspi:
            jspi_options.append(True)
        metafunc.parametrize("has_jspi", jspi_options)
Generate tests with WebAssembly JavaScript Promise Integration both
     enabled and disabled depending on browser/node.js support for features.
     Also drops any test that requires a browser or web-workers in Node.js.
    ).
    
test/contrib/emscripten/conftest.py