{"id":19237162,"url":"https://github.com/epicweb-dev/mocking-techniques","last_synced_at":"2025-06-11T18:04:06.299Z","repository":{"id":247784935,"uuid":"788889588","full_name":"epicweb-dev/mocking-techniques","owner":"epicweb-dev","description":"Everything to know about mocking in TypeScript.","archived":false,"fork":false,"pushed_at":"2025-06-03T06:05:22.000Z","size":3809,"stargazers_count":55,"open_issues_count":2,"forks_count":11,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T18:00:01.289Z","etag":null,"topics":["epicweb-dev","mocking","mocks","stubs","testing","workshop"],"latest_commit_sha":null,"homepage":"https://epicweb.dev/workshops/mocking-techniques-in-vitest","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epicweb-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2024-04-19T09:34:15.000Z","updated_at":"2025-06-03T06:05:24.000Z","dependencies_parsed_at":"2025-03-06T22:21:07.639Z","dependency_job_id":"00bc989b-a4ec-4da5-8fc3-dbfc170b2ca7","html_url":"https://github.com/epicweb-dev/mocking-techniques","commit_stats":null,"previous_names":["epicweb-dev/mocking-techniques"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/epicweb-dev/mocking-techniques","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epicweb-dev%2Fmocking-techniques","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epicweb-dev%2Fmocking-techniques/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epicweb-dev%2Fmocking-techniques/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epicweb-dev%2Fmocking-techniques/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epicweb-dev","download_url":"https://codeload.github.com/epicweb-dev/mocking-techniques/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epicweb-dev%2Fmocking-techniques/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259311854,"owners_count":22838804,"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":["epicweb-dev","mocking","mocks","stubs","testing","workshop"],"created_at":"2024-11-09T16:25:06.352Z","updated_at":"2025-06-11T18:04:06.281Z","avatar_url":"https://github.com/epicweb-dev.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eMocking Techniques in Vitest\u003c/h1\u003e\n  \u003cstrong\u003e\n    Everything to know about mocking in TypeScript.\n  \u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca\n    alt=\"Epic Web logo with the words Deployed Version\"\n    href=\"https://mocking-techniques.epicweb.dev\"\n  \u003e\n    \u003cimg\n      width=\"300px\"\n      src=\"https://github-production-user-asset-6210df.s3.amazonaws.com/1500684/254000390-447a3559-e7b9-4918-947a-1b326d239771.png\"\n    /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003chr /\u003e\n\n\u003c!-- prettier-ignore-start --\u003e\n[![Build Status][build-badge]][build]\n[![GPL 3.0 License][license-badge]][license]\n[![Code of Conduct][coc-badge]][coc]\n\u003c!-- prettier-ignore-end --\u003e\n\n## Prerequisites\n\nYou don't have to have any prior experience with automated testing to complete\nthis workshop. Having a **basic experience with JavaScript**, however, is\nrequired as we won't be covering things like objects, functions, imports/exports\nas a part of this workshop.\n\n## Pre-workshop Resources\n\nFeel free to go through the additional resources below before, during, or after\nthe workshop. They are here to set you on the right track of thinking about\nautomated testing, as well as expand on the concepts and practices we will be\ncovering during the workshop.\n\n- [**The True Purpose of Testing**](https://www.epicweb.dev/the-true-purpose-of-testing)\n- [Anatomy of a Test](https://www.epicweb.dev/anatomy-of-a-test)\n- [The Golden Rule of Assertions](https://www.epicweb.dev/the-golden-rule-of-assertions)\n\n## System Requirements\n\n- [git][git] v2.18 or greater;\n- [NodeJS][node] **v20.11.0** or greater;\n- [npm](https://www.npmjs.com/) v8 or greater.\n\nAll of these must be available in your `PATH`. To verify things are set up\nproperly, you can run this:\n\n```shell\ngit --version\nnode --version\nnpm --version\n```\n\nIf you have trouble with any of these, learn more about the PATH environment\nvariable and how to fix it here for [windows][win-path] or\n[mac/linux][mac-path].\n\n## Setup\n\nFollow these steps to get this set up:\n\n```sh nonumber\ngit clone --depth 1 https://github.com/epicweb-dev/mocking-techniques.git\ncd mocking-techniques\nnpm run setup\n```\n\nIf you experience errors here, please open [an issue][issue] with as many\ndetails as you can offer.\n\n\u003c!-- prettier-ignore --\u003e\n\u003e [!IMPORTANT]\n\u003e Don't forget to run the `npm run setup` step!\n\n## Exercises\n\nYou will find all the exercises in the `exercises` directory. You will be\nprogressing through the workshop in the workshop app (more on that below) and\nworking on every exercise in your code editor of choice.\n\nNote that the purpose of the exercise is **not** to skim through it and\ncontinue. In every exercise, you will get a real-world problem and _you_ will be\ntasked with fixing it. There will be plenty of information and hints to assist\nyou on your path but it is by tackling the problems head-on what will make those\nlearnings stick.\n\n## Running the App\n\nTo get the app up and running, run:\n\n```sh\nnpm start\n```\n\nOpen the address printed in the terminal in the browser, and you're good to go!\n\n## The Workshop App\n\nLearn all about the workshop app on the\n[Epic Web Getting Started Guide](https://www.epicweb.dev/get-started).\n\n[![Kent with the workshop app in the background](https://github-production-user-asset-6210df.s3.amazonaws.com/1500684/280407082-0e012138-e01d-45d5-abf2-86ffe5d03c69.png)](https://www.epicweb.dev/get-started)\n\n\u003c!-- prettier-ignore-start --\u003e\n[node]: https://nodejs.org\n[git]: https://git-scm.com/\n[build-badge]: https://img.shields.io/github/actions/workflow/status/epicweb-dev/mocking-techniques/validate.yml?branch=main\u0026logo=github\u0026style=flat-square\n[build]: https://github.com/epicweb-dev/mocking-techniques/actions?query=workflow%3Avalidate\n[license-badge]: https://img.shields.io/badge/license-GPL%203.0%20License-blue.svg?style=flat-square\n[license]: https://github.com/epicweb-dev/mocking-techniques/blob/main/LICENSE\n[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square\n[coc]: https://kentcdodds.com/conduct\n[win-path]: https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/\n[mac-path]: http://stackoverflow.com/a/24322978/971592\n[issue]: https://github.com/epicweb-dev/mocking-techniques/issues/new\n\u003c!-- prettier-ignore-end --\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepicweb-dev%2Fmocking-techniques","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepicweb-dev%2Fmocking-techniques","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepicweb-dev%2Fmocking-techniques/lists"}