### Description

Refactors benchmark script.

- One can select which benchmark (pystone, numpy, matplotlib, or `all`) to be run through command-line arguments.
  - We can divide each benchmark to separate CI jobs in the future if needed.
- Move pystone benchmark to benchmark directory, preventing it from being included in Pyodide release.

### Checklists

- [x] Add new / update outdated documentation

Close #2150
MAINT Refactor benchmark script. ### Description

Refactors benchmark script.

- One can select which benchmark (pystone, numpy, matplotlib, or `all`) to be run through command-line arguments.
  - We can divide each benchmark to separate CI jobs in the future if needed.
- Move pystone benchmark to benchmark directory, preventing it from being included in Pyodide release.

### Checklists

- [x] Add new / update outdated documentation

Close #2150
import pytest


def test_init(selenium_esm):
    assert "Python initialization complete" in selenium_esm.logs.splitlines()


def test_print(selenium_esm):
    selenium_esm.run("print('This should be logged')")
    assert "This should be logged" in selenium_esm.logs.splitlines()


def test_import_js(selenium_esm):
    if selenium_esm.browser == "node":
        pytest.xfail("No window in node")
    result = selenium_esm.run(
        """
        import js
        js.window.title = 'Foo'
        js.window.title
        """
    )
    assert result == "Foo"
    result = selenium_esm.run(
        """
        dir(js)
        """
    )
    assert len(result) > 100
    assert "document" in result
    assert "window" in result

import pytest


def test_init(selenium_esm):
    assert "Python initialization complete" in selenium_esm.logs.splitlines()


def test_print(selenium_esm):
    selenium_esm.run("print('This should be logged')")
    assert "This should be logged" in selenium_esm.logs.splitlines()


def test_import_js(selenium_esm):
    if selenium_esm.browser == "node":
        pytest.xfail("No window in node")
    result = selenium_esm.run(
        """
        import js
        js.window.title = 'Foo'
        js.window.title
        """
    )
    assert result == "Foo"
    result = selenium_esm.run(
        """
        dir(js)
        """
    )
    assert len(result) > 100
    assert "document" in result
    assert "window" in result
