GithubHelp home page GithubHelp logo

Comments (1)

linfan avatar linfan commented on May 2, 2024

使用Mock文档有简单提到原因。
更详细的背景是0.4.x版本(当前版本)刚开始设计的时候没有考虑测试时候有跨类型调用的情况(测试A类型的时候同时会调用B类型里的方法),后来为了在保持兼容的情况下修复这个问题,在运行期把Mock方法统一自动改为了static类型,但这种设计带来了额外的局限性,就是文档里提到的这些问题。
0.5版本里打算做小幅的不兼容修改(可以从0.4.x很简单的升级上来),来彻底避开这个坑。到时候会在文档里再补充一篇详细的整体原理解释。

from testable-mock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.