Mock README

The project's README from github.com/nuysoft/Mock. As one markdown file: README.md.

Mock.js

Build Status

Mock.js is a simulation data generator to help the front-end to develop and prototype separate from the back-end progress and reduce some monotony particularly while writing automated tests.

The official site: http://mockjs.com

Features

This library is loosely inspired by Elijah Manor's post Mocking Introduction, mennovanslooten/mockJSON, appendto/jquery-mockjax and victorquinn/chancejs.

Questions?

If you have any questions, please feel free to ask through New Issue.

Reporting an Issue

Make sure the problem you're addressing is reproducible. Use http://jsbin.com/ or http://jsfiddle.net/ to provide a test page. Indicate what browsers the issue can be reproduced in. What version of Mock.js is the issue reproducible in. Is it reproducible after updating to the latest version?

License

Mock.js is available under the terms of the MIT License.

Mock (nuysoft/Mock)

Searching Database…

19.6K ·GitHub
这是什么?Mock.js 是一个 JavaScript 库,用来生成模拟数据并模拟 ajax 请求,这样前端开发和自动化测试就不用等真实的后端就能跑起来。
它是接入我前端代码里的库,还是一个独立的 mock 服务器?它是一个包含在你前端代码里的库,而不是单独的服务器——它按模板生成数据,并在你的应用内部模拟 ajax 请求和响应的处理。
怎么把它加到项目里?依赖多不多?README 里没有安装章节;作为一个 JavaScript 库,一般通过 npm 来添加,它运行时只依赖一个包——commander。
功能列表里的所有东西都完整支持吗?不是——README 里基于 HTML 的模板生成被划掉了,所以应该只认为数据模板和 ajax 模拟是受支持的。
它是在浏览器里运行,还是在服务器上运行?它面向浏览器端的前端工作——提交 bug 的检查清单会要求说明问题在哪些浏览器里能复现——它也可以用于自动化测试。
它受了哪些早期项目的启发?它大致参考了 Elijah Manor 的《Mocking Introduction》一文,以及 mockJSON、jquery-mockjax 和 chancejs 这几个库。
这个项目成熟度怎么样?它从 2013 年 4 月起就在 GitHub 上,大约有 19.6k 颗星,也没有被归档;README 本身保持得很简单,有问题会引导你去 GitHub issues 提问。
Creator
nuysoft
Size
5.3 MB
Stars
19.6K
Age
13y
Commits · 90 Days