{"id":15654327,"url":"https://github.com/vitalets/js-testrunners-bench","last_synced_at":"2025-08-31T16:38:16.788Z","repository":{"id":66272947,"uuid":"94347772","full_name":"vitalets/js-testrunners-bench","owner":"vitalets","description":"JavaScript test-runners benchmark","archived":false,"fork":false,"pushed_at":"2017-07-26T11:15:07.000Z","size":73,"stargazers_count":29,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T22:50:30.582Z","etag":null,"topics":["benchmark","test-runners","testing"],"latest_commit_sha":null,"homepage":"https://vitalets.github.io/js-testrunners-bench/index.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitalets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["vitalets"]}},"created_at":"2017-06-14T15:46:23.000Z","updated_at":"2025-03-29T02:29:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d3f76b2-383d-4b05-8323-ffba7734040e","html_url":"https://github.com/vitalets/js-testrunners-bench","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vitalets/js-testrunners-bench","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalets%2Fjs-testrunners-bench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalets%2Fjs-testrunners-bench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalets%2Fjs-testrunners-bench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalets%2Fjs-testrunners-bench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitalets","download_url":"https://codeload.github.com/vitalets/js-testrunners-bench/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalets%2Fjs-testrunners-bench/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273010870,"owners_count":25030367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","test-runners","testing"],"created_at":"2024-10-03T12:50:44.262Z","updated_at":"2025-08-31T16:38:16.771Z","avatar_url":"https://github.com/vitalets.png","language":"JavaScript","funding_links":["https://github.com/sponsors/vitalets"],"categories":["📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"# JavaScript test-runners benchmark\nThe benchmark for running the same tests on the most popular JavaScript test-runners and measuring execution time. Tests are divided onto **unit** and **functional**.\n\n## Unit tests\n\n### Runners\n* [Mocha](https://github.com/mochajs/mocha)\n* [Jasmine](https://github.com/jasmine/jasmine)\n* [AVA](https://github.com/avajs/ava)\n* [Jest](https://github.com/facebook/jest)\n* [tape](https://github.com/substack/tape)\n* [tap](https://github.com/tapjs/node-tap)\n* [mocha-parallel-tests](https://github.com/yandex/mocha-parallel-tests)\n* [mocha.parallel](https://github.com/danielstjules/mocha.parallel)\n* [QUnit](https://github.com/qunitjs/qunit)\n* [lab](https://github.com/hapijs/lab)\n\n### Benchmark conditions\nThis benchmark measures execution time for every combination of following conditions:\n\n#### 1. Test types\n* Synchronous empty test:\n  ```js\n  function () {}\n  ```\n* Synchronous heavy test:\n  ```js\n  function () {\n    for (let i = 0; i \u003c 10000; i++) {\n      new Date();\n    }\n  }\n  ```\n* Asynchronous empty test with zero delay:\n  ```js\n  function (done) {\n    setTimeout(done, 0);\n  }\n  ```\n* Asynchronous empty test with random delay:\n  ```js\n  function (done) {\n    setTimeout(done, Math.round(Math.random() * 10));\n  }\n  ```\n\n#### 2. Tests structure\n* With nested suites \n* Without nested suites\n\n#### 3. Run types\n* With Babel transpiling \n* Without Babel transpiling\n  \n### Latest results\nhttps://vitalets.github.io/js-testrunners-bench/index.html\n\n### Run yourself\n1. Clone the repo:\n    ```bash\n    git clone https://github.com/vitalets/js-testrunners-bench.git\n    ```\n\n2. Install dependencies:\n    ```bash\n    cd js-testrunners-bench\n    npm install\n    ```\n\n3. Generate tests:\n    ```bash\n    node unit gen\n    ```\n    After run check that `/tests` directory is created and filled with test-files.\n    \n4. Run benchmark:\n    ```bash\n    node unit run [testsType] [runType]\n    ```\n    Examples:\n    ```bash\n    # Synchronous empty tests without nested suites and without Babel\n    node unit run test=syncEmptyFn_nestedSuites=false babel=false\n    \n    # Asynchronous tests with random delay 0-10ms with nested suites and Babel\n    node unit run test=asyncEmptyFnRandomDelay_nestedSuites=true babel=true\n    \n    etc..\n    ```\n\n\u003cdetails\u003e\n \u003csummary\u003eExample output:\u003c/summary\u003e\n\n    \u003e node unit run test=syncEmptyFn_nestedSuites=false babel=false\n    JavaScript test-runners benchmark\n    System: darwin x64 4 cpu(s) node v7.2.0\n    Date: Wed Jul 26 2017\n    \n    RUNNER               VERSION\n    mocha                3.4.2  \n    jasmine              2.6.0  \n    mocha.parallel       0.15.2 \n    mocha-parallel-tests 1.2.9  \n    qunit                2.3.3  \n    tape                 4.6.3  \n    tap                  10.3.3 \n    lab                  13.1.0 \n    ava                  0.19.1 \n    jest                 20.0.4 \n    \n    Bench type: test=syncEmptyFn, nestedSuites=false, babel=false\n    Tests count: 250 (50 files)\n    Running: mocha, cmd: mocha tests/unit/test=syncEmptyFn/nestedSuites=false/mocha\n    Running: jasmine, cmd: jasmine JASMINE_CONFIG_PATH=temp/jasmine.json\n    Running: mocha.parallel, cmd: mocha tests/unit/test=syncEmptyFn/nestedSuites=false/mocha.parallel\n    Running: mocha-parallel-tests, cmd: mocha-parallel-tests tests/unit/test=syncEmptyFn/nestedSuites=false/mocha-parallel-tests\n    Running: qunit, cmd: qunit tests/unit/test=syncEmptyFn/nestedSuites=false/qunit\n    Running: tape, cmd: tape tests/unit/test=syncEmptyFn/nestedSuites=false/tape/*.js\n    Running: tap, cmd: tap tests/unit/test=syncEmptyFn/nestedSuites=false/tap --jobs-auto\n    Running: lab, cmd: lab --parallel tests/unit/test=syncEmptyFn/nestedSuites=false/lab\n    Running: ava, cmd: ava tests/unit/test=syncEmptyFn/nestedSuites=false/ava --concurrency=4\n    Running: jest (jsdom), cmd: jest --env=jsdom tests/unit/test=syncEmptyFn/nestedSuites=false/jest\n    Running: jest (node), cmd: jest --env=node tests/unit/test=syncEmptyFn/nestedSuites=false/jest\n    Result:\n    LABEL                TIME \n    jasmine              0.205\n    tape                 0.273\n    qunit                0.332\n    mocha                0.346\n    mocha.parallel       0.420\n    lab                  0.429\n    mocha-parallel-tests 0.471\n    jest (node)          1.84 \n    jest (jsdom)         3.78 \n    tap                  6.32 \n    ava                  8.34 \n    \n    Done.\n\u003c/details\u003e\n\n## Functional tests\n\nNot ready yet.\n\n### Runners\n * todo [Webdriverio](http://webdriver.io)\n * todo [Mocha](https://github.com/mochajs/mocha) + [selenium-webdriver](https://www.npmjs.com/package/selenium-webdriver)\n * todo [CucumberJS](https://github.com/cucumber/cucumber-js)\n * todo [Nightwatch](https://github.com/nightwatchjs/nightwatch)\n * todo [TestCafe](https://github.com/DevExpress/testcafe)\n * todo [Nemo](https://github.com/paypal/nemo)\n\n## Related links\n* [JavaScript Test-Runners Benchmark (Part 1, The Unit Testing)](https://medium.com/dailyjs/javascript-test-runners-benchmark-3a78d4117b4)\n* [JavaScript unit testing tools](https://mo.github.io/2017/06/05/javascript-unit-testing.html)\n* [An Overview of JavaScript Testing in 2017](https://medium.com/powtoon-engineering/a-complete-guide-to-testing-javascript-in-2017-a217b4cd5a2a)\n* [Picking Jest over Mocha – testing tools comparison](https://gziolo.pl/2017/06/17/picking-jest-over-mocha/)\n\n## License\nMIT @ [Vitaliy Potapov](https://github.com/vitalets)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitalets%2Fjs-testrunners-bench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitalets%2Fjs-testrunners-bench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitalets%2Fjs-testrunners-bench/lists"}