{"id":13509360,"url":"https://github.com/karma-runner/karma-jasmine","last_synced_at":"2025-05-13T17:07:24.595Z","repository":{"id":6740948,"uuid":"7987180","full_name":"karma-runner/karma-jasmine","owner":"karma-runner","description":"A Karma plugin - adapter for Jasmine testing framework.","archived":false,"fork":false,"pushed_at":"2025-03-04T19:39:22.000Z","size":2252,"stargazers_count":543,"open_issues_count":44,"forks_count":161,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-24T01:51:53.260Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/karma-runner.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2013-02-03T06:22:34.000Z","updated_at":"2025-04-04T09:33:29.000Z","dependencies_parsed_at":"2024-01-13T20:39:59.435Z","dependency_job_id":"674f60f4-61fd-4a0c-91fc-bc23238903bf","html_url":"https://github.com/karma-runner/karma-jasmine","commit_stats":{"total_commits":253,"total_committers":47,"mean_commits":5.382978723404255,"dds":0.7707509881422925,"last_synced_commit":"057bf014c4ff0901a772dca7b04b7aaa5606a179"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karma-runner%2Fkarma-jasmine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karma-runner%2Fkarma-jasmine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karma-runner%2Fkarma-jasmine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karma-runner%2Fkarma-jasmine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karma-runner","download_url":"https://codeload.github.com/karma-runner/karma-jasmine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990466,"owners_count":21995774,"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","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":"2024-08-01T02:01:06.619Z","updated_at":"2025-05-13T17:07:24.549Z","avatar_url":"https://github.com/karma-runner.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"# karma-jasmine\n\n[![npm version](https://img.shields.io/npm/v/karma-jasmine?style=flat-square)](https://www.npmjs.com/package/karma-jasmine)\n[![npm downloads](https://img.shields.io/npm/dm/karma-jasmine?style=flat-square)](https://www.npmjs.com/package/karma-jasmine)\n[![Release Workflow Status](https://img.shields.io/github/workflow/status/karma-runner/karma-jasmine/Release/master?style=flat-square\u0026logo=github\u0026label=Release)](https://github.com/karma-runner/karma-jasmine/actions/workflows/release.yml?query=branch%3Amaster)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen?style=flat-square)](https://github.com/karma-runner/karma-jasmine)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079?style=flat-square)](https://github.com/semantic-release/semantic-release)\n\n\u003e Adapter for the [Jasmine](https://jasmine.github.io/) testing framework.\n\n## Installation\n\n```bash\nnpm install karma-jasmine --save-dev\n```\n\n## Configuration\n\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n  config.set({\n    frameworks: ['jasmine'],\n    files: [\n      '*.js'\n    ]\n  })\n}\n```\n\nIf you want to run only some tests whose name match a given pattern you can do this in the following way\n\n```bash\n$ karma start \u0026\n$ karma run -- --grep=\u003cpattern\u003e\n```\n\nwhere pattern is either a string (e.g `--grep=#slow` runs tests containing \"#slow\") or a Regex (e.g `--grep=/^(?!.*#slow).*$/` runs tests _not_ containing \"#slow\").\n\nYou can also pass it to `karma.config.js`:\n\n```js\nmodule.exports = function(config) {\n  config.set({\n    // ...\n    client: {\n      args: ['--grep', '\u003cpattern\u003e'],\n      // ...\n    }\n  })\n}\n```\n\nIf you want to pass configuration options directly to jasmine you can do this in the following way\n\n```js\nmodule.exports = function(config) {\n  config.set({\n    client: {\n      jasmine: {\n        random: true,\n        seed: '4321',\n        oneFailurePerSpec: true,\n        failFast: true,\n        timeoutInterval: 1000\n      }\n    }\n  })\n}\n```\n\n## Debug by URL\n\nFailing tests print a debug URL with `?spec=`. Use it with `--no_single_run`\nand paste it into your browser to focus on a single failing test.\n\n## Sharding\n\nBy setting `config.client.shardIndex` and `config.client.totalShards`, you can\nrun a subset of the full set of specs. Complete sharding support needs to be\ndone in the process that calls karma, and would need to support test result\nintegration across shards.\n\n## Custom spec filter\n\nProviding a [custom spec filter](https://jasmine.github.io/api/edge/Configuration#specFilter) is also supported.\n\nExample:\n\n```js\n// Users are able to set a custom specFilter themselves\n\njasmine.getEnv().configure({\n  specFilter: function (spec) {\n    return spec.getFullName() === 'spec that succeeds'\n  }\n})\n\ndescribe('spec', () =\u003e {\n  it('that fails', () =\u003e {\n    fail('This spec should not run!')\n  })\n\n  it('that succeeds', () =\u003e {\n    expect(1).toBe(1)\n  })\n})\n```\n\n---\n\nFor more information on Karma see the [homepage](https://karma-runner.github.io/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarma-runner%2Fkarma-jasmine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarma-runner%2Fkarma-jasmine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarma-runner%2Fkarma-jasmine/lists"}