{"id":24529820,"url":"https://github.com/learosema/javascript-tests","last_synced_at":"2026-06-23T22:32:33.173Z","repository":{"id":88706674,"uuid":"138999764","full_name":"learosema/javascript-tests","owner":"learosema","description":"A comparison of test frameworks in javascript","archived":false,"fork":false,"pushed_at":"2018-06-30T17:23:48.000Z","size":289,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-10T20:40:15.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/learosema.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2018-06-28T09:53:29.000Z","updated_at":"2018-06-30T17:23:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"e67f4f9d-b64c-49bb-a541-77424ca89581","html_url":"https://github.com/learosema/javascript-tests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/learosema/javascript-tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learosema%2Fjavascript-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learosema%2Fjavascript-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learosema%2Fjavascript-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learosema%2Fjavascript-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/learosema","download_url":"https://codeload.github.com/learosema/javascript-tests/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learosema%2Fjavascript-tests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34709802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"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":[],"created_at":"2025-01-22T07:52:51.923Z","updated_at":"2026-06-23T22:32:33.167Z","avatar_url":"https://github.com/learosema.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# javascript-tests\nA comparison of test frameworks in javascript\n\nIn this repo, I am going to experiment with several test frameworks that are available in JavaScript and give a quick overview.\n\nOn my machine, I am using the current LTS version of node in a Windows environment, but other platforms with node versions \u003e= v8.11.3 should work fine. \n\nFor bundling and transpilation, I'm using `babel` and the [parceljs bundler](https://parceljs.org).\n\n## running the example\n\nType `npm install` to install the dependencies and then type `npm start`.\nAlternatively, you can also just browse to https://terabaud.github.io/javascript-tests/ and hit F12.\n\n## What are we going to test?\n\nFor now, we are going to test a pretty boring [math.js](https://github.com/terabaud/javascript-tests/blob/master/src/math.js) library.\nAs a pretest step, linting is done via  [standardjs](https://standardjs.com).\n\n## Testing\n\nType `npm test` to run all the tests.\n\n### tape\n\n[tape](https://github.com/substack/tape) is a simple testing framework that produces [TAP](http://testanything.org/) output, a standardized protocol for automated tests. \n\nTo use tape in your project, install [tape](https://npmjs.com/package/tape), [babel-tape-runner](https://npmjs.com/package/babel-tape-runner) alongside with  [babel-preset-env](https://npmjs.com/package/babel-preset-env) or any other babel preset you like. To beautify the output, [faucet](https://github.com/substack/faucet) is used.\n\nNo other configuration is needed.\n\n### mocha and chai\n\n[mocha](https://mochajs.org) is a commonly used testing framework for node and in the browser. It is often used in combination with [chai](https://chaijs.com), a BDD/TDD assertion library.\n\nTo add mocha into your project, `npm install mocha chai babel-register --save-dev` and call the tests via `mocha --require babel-register`. The require parameter is needed for ES6+ support. If you don't specify a file, mocha executes everything inside the `test` folder.\n\n### Jest\n\n[jest](http://jestjs.io/) by facebook features zero (minimal) configuration, test parallelization and built-in code coverage reports.\n\n### Other testing frameworks and tools (not covered here)\n\n* [Enzyme](https://github.com/airbnb/enzyme) by airbnb is a set of testing utilities for React applications and can be used by any common testing framework.\n* [jasmine](https://jasmine.github.io/), a BDD testing framework by Pivotal Labs.\n* [ShouldJS](https://shouldjs.github.io) is another assertion library and very similar to chai.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearosema%2Fjavascript-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flearosema%2Fjavascript-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearosema%2Fjavascript-tests/lists"}