{"id":15638734,"url":"https://github.com/egoist/tyu-deprecated","last_synced_at":"2025-08-03T00:08:18.389Z","repository":{"id":45275040,"uuid":"106106615","full_name":"egoist/tyu-deprecated","owner":"egoist","description":"Unit test with no initial configuration.","archived":false,"fork":false,"pushed_at":"2021-12-25T14:33:51.000Z","size":78,"stargazers_count":92,"open_issues_count":5,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T04:42:59.687Z","etag":null,"topics":["be-happy","component","jest","react","test","vue"],"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/egoist.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}},"created_at":"2017-10-07T15:03:31.000Z","updated_at":"2025-01-22T15:38:53.000Z","dependencies_parsed_at":"2022-09-26T16:22:33.118Z","dependency_job_id":null,"html_url":"https://github.com/egoist/tyu-deprecated","commit_stats":null,"previous_names":["egoist/test-vue-app"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Ftyu-deprecated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Ftyu-deprecated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Ftyu-deprecated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Ftyu-deprecated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egoist","download_url":"https://codeload.github.com/egoist/tyu-deprecated/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249191911,"owners_count":21227677,"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":["be-happy","component","jest","react","test","vue"],"created_at":"2024-10-03T11:22:55.513Z","updated_at":"2025-04-16T03:43:53.647Z","avatar_url":"https://github.com/egoist.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# There's no update for four years and visually nonody uses it, so I'm deprecating this project now.\n\n\n![tyu](https://user-images.githubusercontent.com/8784712/32615354-9059c466-c5aa-11e7-9d1d-bc403ec55a94.png)\n\n[![NPM version](https://img.shields.io/npm/v/tyu.svg?style=flat)](https://npmjs.com/package/tyu) [![NPM downloads](https://img.shields.io/npm/dm/tyu.svg?style=flat)](https://npmjs.com/package/tyu) [![CircleCI](https://circleci.com/gh/egoist/tyu/tree/master.svg?style=shield)](https://circleci.com/gh/egoist/tyu/tree/master)  [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000\u0026style=flat)](https://github.com/egoist/donate) [![chat](https://img.shields.io/badge/chat-on%20discord-7289DA.svg?style=flat)](https://chat.egoist.moe)\n\nDelightful web testing.\n\n## Install\n\n```bash\n# Recommend to install locally\nyarn add tyu --dev\n# Alternatively\nyarn global add tyu\n```\n\n## Works with\n\n- React components (eg. create-react-app)\n- Vue components (eg. vue-cli)\n- ...\n\n## Usage\n\nGiven a Vue component `Component.vue`:\n\n```vue\n\u003ctemplate\u003e\n  \u003cdiv\u003eHello {{ msg }}\u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nexport default {\n  data() {\n    return {\n      msg: 'world'\n    }\n  }\n}\n\u003c/script\u003e\n```\n\nAnd corresponding test file `Component.test.js`:\n\n```js\n// You need to install Vue Test utils\nimport { mount } from '@vue/test-utils'\nimport Component from './Component.vue'\n\ndescribe('Component', () =\u003e {\n  test('is a Vue instance', () =\u003e {\n    const wrapper = mount(Component)\n    expect(wrapper.isVueInstance()).toBeTruthy()\n  })\n\n  test('has correct content', () =\u003e {\n    const wrapper = mount(Component)\n    expect(wrapper.text()).toBe('Hello world')\n  })\n})\n```\n\nThen run `yarn tyu` or `npx tyu` (when it's installed locally) or `tyu` (when it's installed globally) in your project as follows:\n\n\u003cimg src=\"https://i.loli.net/2017/11/09/5a0479292f48f.png\" alt=\"tyu\" width=\"600\"\u003e\n\nNote: Currently, `tyu` works out of the box with apps using [babel-preset-vue-app](https://github.com/vuejs/babel-preset-vue-app), however you may add a `.babelrc` file if you have custom needs. e.g. use `babel-preset-react-app` if you're testing React components.\n\n### Custom jest config\n\nYou can still configure `jest` field in `package.json`, it will be merged into our default jest config.\n\n### Custom jest cli arguments\n\nSpecify desired [jest cli arguments](https://facebook.github.io/jest/docs/en/cli.html) after `--`, eg:\n\n```bash\ntyu -- --watch\n```\n\n## Projects using TYU\n\n- [vue-inter](https://github.com/egoist/vue-inter) - Simple 1kB i18n library for Vue.js.\n- Feel free to add your here..\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n\n## Author\n\n**tyu** © [EGOIST](https://github.com/egoist), Released under the [MIT](./LICENSE) License.\u003cbr\u003e\nAuthored and maintained by EGOIST with help from contributors ([list](https://github.com/egoist/tyu/contributors)).\n\n\u003e [egoist.moe](https://egoist.moe) · GitHub [@EGOIST](https://github.com/egoist) · Twitter [@_egoistlily](https://twitter.com/_egoistlily)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegoist%2Ftyu-deprecated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegoist%2Ftyu-deprecated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegoist%2Ftyu-deprecated/lists"}