{"id":13464968,"url":"https://github.com/eddyerburgh/avoriaz","last_synced_at":"2025-05-15T16:07:16.116Z","repository":{"id":15969344,"uuid":"78473918","full_name":"eddyerburgh/avoriaz","owner":"eddyerburgh","description":"🔬 a Vue.js testing utility library","archived":false,"fork":false,"pushed_at":"2022-12-07T01:23:01.000Z","size":945,"stargazers_count":754,"open_issues_count":46,"forks_count":62,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-12T15:15:51.602Z","etag":null,"topics":["avoriaz","test-driven-development","testing","testing-tools","tests","vue","vue-test","vue-test-utilities","vue-test-utils","vue-testing","vue-testing-framework","vue-testing-tools","vue-testing-utilities","vuejs","vuejs2","vuesjs2-testing"],"latest_commit_sha":null,"homepage":"https://eddyerburgh.gitbooks.io/avoriaz/content/","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/eddyerburgh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-09T22:12:59.000Z","updated_at":"2025-05-09T03:10:47.000Z","dependencies_parsed_at":"2023-01-14T00:30:43.891Z","dependency_job_id":null,"html_url":"https://github.com/eddyerburgh/avoriaz","commit_stats":null,"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddyerburgh%2Favoriaz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddyerburgh%2Favoriaz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddyerburgh%2Favoriaz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddyerburgh%2Favoriaz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddyerburgh","download_url":"https://codeload.github.com/eddyerburgh/avoriaz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010790,"owners_count":21998993,"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":["avoriaz","test-driven-development","testing","testing-tools","tests","vue","vue-test","vue-test-utilities","vue-test-utils","vue-testing","vue-testing-framework","vue-testing-tools","vue-testing-utilities","vuejs","vuejs2","vuesjs2-testing"],"created_at":"2024-07-31T14:00:53.666Z","updated_at":"2025-05-15T16:07:11.102Z","avatar_url":"https://github.com/eddyerburgh.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","实用库","Awesome Vue.js [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)","叫研发工具组","Dev Tools"],"sub_categories":["Testing","试验","Test"],"readme":"# avoriaz [![Build Status](https://travis-ci.org/eddyerburgh/avoriaz.svg?branch=master)](https://travis-ci.org/eddyerburgh/avoriaz)\n\n\n\u003e a Vue.js testing utility library\n\n## Deprecation\n\nThis library will be deprecated once [vue-test-utils](https://github.com/vuejs/vue-test-utils) is released.\n\n## Installation\n\n```\nnpm install --save-dev avoriaz\n```\n\n## Documentation\n\n[Visit the docs](https://eddyerburgh.gitbooks.io/avoriaz/content/)\n\n## Examples\n\n- [Example using karma and mocha](https://github.com/eddyerburgh/avoriaz-karma-mocha-example)\n- [Example using karma and jasmine](https://github.com/eddyerburgh/avoriaz-karma-jasmine-example)\n- [Example using Jest](https://github.com/eddyerburgh/avoriaz-jest-example)\n- [Example using mocha-webpack](https://github.com/eddyerburgh/avoriaz-mocha-example)\n- [Example using tape](https://github.com/eddyerburgh/avoriaz-tape-example)\n- [Example using ava](https://github.com/eddyerburgh/avoriaz-ava-example)\n\n##### Assert wrapper contains a child\n```js\nimport { mount } from 'avoriaz'\nimport Foo from './Foo.vue'\n\nconst wrapper = mount(Foo)\nexpect(wrapper.contains('.bar')).to.equal(true)\n```\n\n##### Shallow render components\n```js\nimport { shallow } from 'avoriaz'\nimport Foo from './Foo.vue'\nimport Bar from './Bar.vue'\n\nconst wrapper = shallow(Foo)\nexpect(wrapper.contains(Bar)).to.equal(true)\n```\n\n##### Assert style is rendered\n```js\nconst button = wrapper.find('div \u003e button .button-child')[0]\nexpect(button.hasStyle('color', 'red')).to.equal(true)\n```\n\n##### Assert method is called when DOM event is triggered\n```js\nconst clickHandler = sinon.stub()\nconst wrapper = mount(Foo, {\n  propsData: { clickHandler }\n})\nwrapper.find('div .bar')[0].trigger('click')\nexpect(clickHandler.called).to.equal(true)\n```\n\n##### Assert wrapper contains text\n```js\nconst title = wrapper.find('h1.title')[0]\nexpect(title.text()).to.equal('some text')\n```\n\n##### Inject globals\n```js\nconst $route = { path: 'http://www.example-path.com' }\nconst wrapper = mount(Foo, { \n    globals: {\n        $route\n    }\n})\nexpect(wrapper.vm.$route.path).to.equal($route.path)\n```\n\n##### Inject slots\n```js\nconst wrapper = mount(Foo, { \n    slots: {\n        default: Foo\n    }\n})\n```\n\n##### Set data\n```js\nwrapper.setData({\n  someData: 'some data'\n})\n\nexpect(wrapper.vm.someData).to.equal('some data')\n```\n\n##### Update props\n```js\nwrapper.setProps({\n  someProp: 'some prop',\n  anotherProp: 'another prop'\n})\n```\n\nFor more examples, [see the docs](https://eddyerburgh.gitbooks.io/avoriaz/content/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddyerburgh%2Favoriaz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddyerburgh%2Favoriaz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddyerburgh%2Favoriaz/lists"}