MAINT Add pytest.mark.xfail_browsers and use it to reduce boilerplate. Use a decorator to indicate which browsers we want to xfail test. This works for `run_in_pyodide` as well as normal tests.
from pyodide_test_runner import run_in_pyodide


@run_in_pyodide(packages=["xarray"])
def test_xarray():
    import xarray as xr

    da = xr.DataArray(data=[[0, 1, 2], [3, 4, 5]], dims=("x", "y"))
    xr.testing.assert_equal(a=da.mean(), b=xr.DataArray(data=2.5))

from pyodide_test_runner import run_in_pyodide


@run_in_pyodide(packages=["xarray"])
def test_xarray():
    import xarray as xr

    da = xr.DataArray(data=[[0, 1, 2], [3, 4, 5]], dims=("x", "y"))
    xr.testing.assert_equal(a=da.mean(), b=xr.DataArray(data=2.5))
