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.
{
  "name": "pyodide",
  "version": "0.21.0-dev.0",
  "description": "The Pyodide JavaScript package",
  "keywords": [
    "python",
    "webassembly"
  ],
  "homepage": "https://github.com/pyodide/pyodide",
  "repository": {
    "type": "git",
    "url": "https://github.com/pyodide/pyodide"
  },
  "bugs": {
    "url": "https://github.com/pyodide/pyodide/issues"
  },
  "license": "Apache-2.0",
  "devDependencies": {
    "@rollup/plugin-commonjs": "^21.0.1",
    "@rollup/plugin-node-resolve": "^13.1.3",
    "@types/assert": "^1.5.6",
    "@types/emscripten": "^1.39.5",
    "@types/expect": "^24.3.0",
    "@types/mocha": "^9.1.0",
    "@types/node": "^17.0.25",
    "@types/node-fetch": "^2.6.1",
    "@types/ws": "^8.5.3",
    "chai": "^4.3.6",
    "chai-as-promised": "^7.1.1",
    "cross-env": "^7.0.3",
    "dts-bundle-generator": "^6.7.0",
    "error-stack-parser": "^2.0.6",
    "express": "^4.17.3",
    "mocha": "^9.0.2",
    "npm-run-all": "^4.1.5",
    "nyc": "^15.1.0",
    "prettier": "^2.2.1",
    "puppeteer": "^13.6.0",
    "rollup": "^2.48.0",
    "rollup-plugin-terser": "^7.0.2",
    "rollup-plugin-ts": "^2.0.5",
    "terser": "^5.7.0",
    "ts-mocha": "^9.0.2",
    "tsd": "^0.15.1",
    "typedoc": "^0.22.15",
    "typescript": "^4.6.4"
  },
  "main": "pyodide.js",
  "exports": {
    ".": {
      "require": "./pyodide.js",
      "import": "./pyodide.mjs"
    },
    "./pyodide.mjs": "./pyodide.mjs",
    "./pyodide.js": "./pyodide.js",
    "./package.json": "./package.json"
  },
  "files": [
    "pyodide*",
    "packages.json",
    "distutils.tar",
    "console.html"
  ],
  "browser": {
    "child_process": false,
    "crypto": false,
    "fs": false,
    "fs/promises": false,
    "path": false,
    "vm": false,
    "ws": false
  },
  "scripts": {
    "test": "npm-run-all test:*",
    "test:unit": "cross-env TEST_NODE=1 ts-mocha -p tsconfig.test.json test/unit/**/*.test.ts",
    "test:node": "cross-env TEST_NODE=1 mocha test/integration/**/*.test.js",
    "test:browser": "mocha test/integration/**/*.test.js",
    "coverage": "cross-env TEST_NODE=1 npm-run-all coverage:*",
    "coverage:build": "nyc npm run test:node"
  },
  "mocha": {
    "bail": false,
    "timeout": 30000,
    "full-trace": true,
    "inline-diffs": true,
    "check-leaks": false,
    "global": [
      "pyodide",
      "page",
      "chai"
    ],
    "file": [
      "test/conftest.js"
    ]
  },
  "nyc": {
    "reporter": [
      "html",
      "text-summary"
    ],
    "include": [
      "*.ts"
    ],
    "all": true,
    "clean": true,
    "cache": false,
    "instrument": false,
    "checkCoverage": true,
    "statements": 95,
    "functions": 95,
    "branches": 80,
    "lines": 95
  },
  "tsd": {
    "compilerOptions": {
      "lib": [
        "ES2017",
        "DOM"
      ]
    }
  },
  "dependencies": {
    "base-64": "^1.0.0",
    "node-fetch": "^2.6.1",
    "ws": "^8.5.0"
  }
}

{
  "name": "pyodide",
  "version": "0.21.0-dev.0",
  "description": "The Pyodide JavaScript package",
  "keywords": [
    "python",
    "webassembly"
  ],
  "homepage": "https://github.com/pyodide/pyodide",
  "repository": {
    "type": "git",
    "url": "https://github.com/pyodide/pyodide"
  },
  "bugs": {
    "url": "https://github.com/pyodide/pyodide/issues"
  },
  "license": "Apache-2.0",
  "devDependencies": {
    "@rollup/plugin-commonjs": "^21.0.1",
    "@rollup/plugin-node-resolve": "^13.1.3",
    "@types/assert": "^1.5.6",
    "@types/emscripten": "^1.39.5",
    "@types/expect": "^24.3.0",
    "@types/mocha": "^9.1.0",
    "@types/node": "^17.0.25",
    "@types/node-fetch": "^2.6.1",
    "@types/ws": "^8.5.3",
    "chai": "^4.3.6",
    "chai-as-promised": "^7.1.1",
    "cross-env": "^7.0.3",
    "dts-bundle-generator": "^6.7.0",
    "error-stack-parser": "^2.0.6",
    "express": "^4.17.3",
    "mocha": "^9.0.2",
    "npm-run-all": "^4.1.5",
    "nyc": "^15.1.0",
    "prettier": "^2.2.1",
    "puppeteer": "^13.6.0",
    "rollup": "^2.48.0",
    "rollup-plugin-terser": "^7.0.2",
    "rollup-plugin-ts": "^2.0.5",
    "terser": "^5.7.0",
    "ts-mocha": "^9.0.2",
    "tsd": "^0.15.1",
    "typedoc": "^0.22.15",
    "typescript": "^4.6.4"
  },
  "main": "pyodide.js",
  "exports": {
    ".": {
      "require": "./pyodide.js",
      "import": "./pyodide.mjs"
    },
    "./pyodide.mjs": "./pyodide.mjs",
    "./pyodide.js": "./pyodide.js",
    "./package.json": "./package.json"
  },
  "files": [
    "pyodide*",
    "packages.json",
    "distutils.tar",
    "console.html"
  ],
  "browser": {
    "child_process": false,
    "crypto": false,
    "fs": false,
    "fs/promises": false,
    "path": false,
    "vm": false,
    "ws": false
  },
  "scripts": {
    "test": "npm-run-all test:*",
    "test:unit": "cross-env TEST_NODE=1 ts-mocha -p tsconfig.test.json test/unit/**/*.test.ts",
    "test:node": "cross-env TEST_NODE=1 mocha test/integration/**/*.test.js",
    "test:browser": "mocha test/integration/**/*.test.js",
    "coverage": "cross-env TEST_NODE=1 npm-run-all coverage:*",
    "coverage:build": "nyc npm run test:node"
  },
  "mocha": {
    "bail": false,
    "timeout": 30000,
    "full-trace": true,
    "inline-diffs": true,
    "check-leaks": false,
    "global": [
      "pyodide",
      "page",
      "chai"
    ],
    "file": [
      "test/conftest.js"
    ]
  },
  "nyc": {
    "reporter": [
      "html",
      "text-summary"
    ],
    "include": [
      "*.ts"
    ],
    "all": true,
    "clean": true,
    "cache": false,
    "instrument": false,
    "checkCoverage": true,
    "statements": 95,
    "functions": 95,
    "branches": 80,
    "lines": 95
  },
  "tsd": {
    "compilerOptions": {
      "lib": [
        "ES2017",
        "DOM"
      ]
    }
  },
  "dependencies": {
    "base-64": "^1.0.0",
    "node-fetch": "^2.6.1",
    "ws": "^8.5.0"
  }
}
