我最近正在学习莫基托和PowerMock。 //This method belongs to the Messages class return MessageSupplier.getMessage(locale, key, args); //the new class @PowerMockIgnore( {
使用jest和typescript,我想知道这是否可能仅仅模拟函数返回的一部分。我的目标是为模拟部分传递一个间谍,并接收未模拟部分的原始函数输出。给定以下函数,我想模拟返回的一部分: function: void;
anotherFunction; // I don't want to alter this funct