Skip to content

Using invoke multiple times for stubbing the same function does not work properly.(同一函数打桩使用多次invoke无法很好工作) #60

@WFrame0224

Description

@WFrame0224

When using the MOCKER in the following way, the expectation is: func1, func1, func2; however, during actual runtime, the second rule for func1 is skipped, and the stubbing effect becomes func1, func2.
下面这种方式MOCKER时,期待:func1,func1,func2;但是实际运行时出现,func1第二次规则会被跳过,打桩效果变为func1,func2

MOCKER(xxx)
    .stubs()
    .will(invoke(func1))
    .then(invoke(func1))
    .then(invoke(func2));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions