{"id":18429438,"url":"https://github.com/bigpipe/assume-enzyme","last_synced_at":"2026-05-08T17:38:59.441Z","repository":{"id":57185235,"uuid":"88624769","full_name":"bigpipe/assume-enzyme","owner":"bigpipe","description":"Improved assertions when using Enzyme","archived":false,"fork":false,"pushed_at":"2017-04-18T13:41:04.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T00:09:04.075Z","etag":null,"topics":["assume","enzyme","expect","react","react-native","test","testing"],"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/bigpipe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-04-18T12:53:15.000Z","updated_at":"2017-04-18T14:16:21.000Z","dependencies_parsed_at":"2022-09-14T10:02:33.286Z","dependency_job_id":null,"html_url":"https://github.com/bigpipe/assume-enzyme","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigpipe%2Fassume-enzyme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigpipe%2Fassume-enzyme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigpipe%2Fassume-enzyme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigpipe%2Fassume-enzyme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigpipe","download_url":"https://codeload.github.com/bigpipe/assume-enzyme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788869,"owners_count":21161726,"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":["assume","enzyme","expect","react","react-native","test","testing"],"created_at":"2024-11-06T05:17:11.006Z","updated_at":"2026-05-08T17:38:54.409Z","avatar_url":"https://github.com/bigpipe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# assume-enzyme\n\nThe `assume-enzyme` module provides a more human readable API and assertion\noutput when using Enzyme in your test suite.\n\n## Installation\n\nThe module is published to the public npm registry and should be installed\na dev dependency.\n\n```bash\nnpm install --save-dev assume-enzyme\n```\n\n## API\n\n- [enzyme](#enzyme)\n- [className, classNames](#classname-classnames)\n- [contain, contains](#contain-contains)\n- [tagName](#tagName)\n- [checked](#checked)\n- [disabled](#disabled)\n- [props](#props)\n\n#### enzyme\n\nAssert that a given value is an enzyme instance.\n\n```js\nfunction Example() {\n  return (\n    \u003cdiv className='hello world'\u003e\u003c/div\u003e\n  );\n}\n\nwrapper = shallow(\u003cExample /\u003e);\nassume(wrapper).is.enzyme();\n```\n\n#### className, classNames\n\nAssert that a given component has the supplied classNames.\n\n```js\nfunction Example() {\n  return (\n    \u003cdiv className='hello world'\u003e\u003c/div\u003e\n  );\n}\n\nwrapper = shallow(\u003cExample /\u003e);\nassume(wrapper).to.have.className('hello');\nassume(wrapper).to.have.className('world');\n```\n\n#### contain, contains\n\nAssert that a given wrapper contains a given component. While this method\noverrides the default `contains` and `contain` methods it will still work as\nexpected as this functionality is only triggered if we're passed in a enzyme\ninstance.\n\n#### tagName\n\nAssert that a component has a given tag name.\n\n```js\nfunction Example() {\n  return (\n    \u003cdiv className='hello world'\u003e\u003c/div\u003e\n  );\n}\n\nwrapper = shallow(\u003cExample /\u003e);\nassume(wrapper).to.have.tagName('div');\n```\n\n#### checked\n\nAssert that a given input is checked or not.\n\n```js\nfunction Example() {\n  return (\n    \u003cinput id='hello' defaultChecked /\u003e\n  );\n}\n\nwrapper = shallow(\u003cExample /\u003e);\nassume(wrapper).is.checked();\n```\n\n#### disabled\n\nAssert that a given input is disabled or not.\n\n```js\nfunction Example() {\n  return (\n    \u003cinput id='hello' disabled /\u003e\n  );\n}\n\nwrapper = shallow(\u003cExample /\u003e);\nassume(wrapper).is.disabled();\n```\n\n#### props\n\nAssert that a component has a given set of props assigned to it.\n\n```js\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigpipe%2Fassume-enzyme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigpipe%2Fassume-enzyme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigpipe%2Fassume-enzyme/lists"}