Mocking made easy
summary
A tiny mocking library called datamock replaces real endpoints by intercepting XHR/fetch/Axios, using a code-driven config and named scenarios so one can toggle between a default list-of-widgets and a “bad widget” with ID 101; demo shows adding widgets with delays and HTTP codes and the mocked flows working live. A Chrome extension enumerates scenarios. Known limitations include no network tab entries and missing GraphQL and schema validation.
AI-written summary · about
chapters (4)
- 0:00Start
- 3:12Happy and unhappy paths
- 7:32Example: api-mocker
- 19:32What can data-mocks do for integration tests?








