{"id":15942137,"url":"https://github.com/smacker/karma-jasmine-expect-jsx","last_synced_at":"2025-04-30T05:23:46.563Z","repository":{"id":57288464,"uuid":"47601176","full_name":"smacker/karma-jasmine-expect-jsx","owner":"smacker","description":"A Karma plugin. Adds toEqualJSX matcher for the Jasmine BDD JavaScript testing library.","archived":false,"fork":false,"pushed_at":"2017-10-27T16:44:57.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T20:50:05.065Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smacker.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}},"created_at":"2015-12-08T05:42:04.000Z","updated_at":"2017-10-27T16:35:22.000Z","dependencies_parsed_at":"2022-09-20T01:43:17.391Z","dependency_job_id":null,"html_url":"https://github.com/smacker/karma-jasmine-expect-jsx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smacker%2Fkarma-jasmine-expect-jsx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smacker%2Fkarma-jasmine-expect-jsx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smacker%2Fkarma-jasmine-expect-jsx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smacker%2Fkarma-jasmine-expect-jsx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smacker","download_url":"https://codeload.github.com/smacker/karma-jasmine-expect-jsx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251646335,"owners_count":21620912,"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-10-07T07:40:27.013Z","updated_at":"2025-04-30T05:23:46.545Z","avatar_url":"https://github.com/smacker.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# karma-jasmine-expect-jsx\n\n\u003e A [Karma](http://karma-runner.github.io/) plugin to inject [jasmine-expect-jsx](https://github.com/smacker/jasmine-expect-jsx) for [Jasmine](http://jasmine.github.io/).\n\n## Installation\n\n### npm\n\n```bash\nnpm install karma-jasmine-expect-jsx --save-dev\n```\n\n## Integration\n\n### Karma\n\nJust include `'jasmine-expect-jsx'` in the `frameworks` section of your config.\nIf you want colored output add `'jasmine-expect-jsx'` in reporters section before others.\n\n```javascript\nmodule.exports = function(config) {\n    config.set({\n        frameworks: [\n            'jasmine',\n            'jasmine-expect-jsx'\n        ],\n        reporters: [\n            'jasmine-expect-jsx',\n            'spec'\n        ],\n        files: [\n            'src/**/*.js',\n            'src/**/*.spec.js'\n        ]\n    });\n};\n```\n\n## Usage\n\nThe following tests are all passing:\n\n```javascript\nclass TestComponent extends React.Component {}\n\n// equalJSX\nexpect(\u003cdiv /\u003e).toEqualJSX(\u003cdiv /\u003e);\nexpect(\u003cTestComponent /\u003e).toEqualJSX(\u003cTestComponent /\u003e);\n\nexpect(\u003cdiv /\u003e).not.toEqualJSX(\u003cspan /\u003e);\nexpect(\u003cTestComponent /\u003e).not.toEqualJSX(\u003cspan /\u003e);\n\n// includeJSX\nexpect(\u003cdiv\u003e\u003cspan\u003eHello World!\u003c/span\u003e\u003c/div\u003e).toIncludeJSX(\u003cspan\u003eHello World!\u003c/span\u003e);\nexpect(\u003cTestComponent /\u003e).toIncludeJSX(\u003cSomeSubComponent /\u003e); // assuming \u003cSomeSubComponent /\u003e is rendered by TestComponent's render\n\nexpect(\u003cdiv\u003e\u003cspan\u003eHello World!\u003c/span\u003e\u003c/div\u003e).not.toIncludeJSX(\u003cspan\u003eHello World!\u003c/span\u003e);\nexpect(\u003cTestComponent /\u003e).not.toIncludeJSX(\u003cSomeSubComponent /\u003e); // assuming \u003cSomeSubComponent /\u003e is not rendered by TestComponent's render\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmacker%2Fkarma-jasmine-expect-jsx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmacker%2Fkarma-jasmine-expect-jsx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmacker%2Fkarma-jasmine-expect-jsx/lists"}