我正在尝试我在其他问题中看到的没有运气的东西:
我尝试使用覆盖默认引擎配置
app.register('.js.html', {
compiler: function(str,options){...}
});
Run Code Online (Sandbox Code Playgroud)
但是快递js中的注册是未定义的.
我让Bliss以这种方式工作
exports.index = function(req, res){
//res.render('index', {});
res.send(bliss.render(__dirname+"/index",{}));
};
Run Code Online (Sandbox Code Playgroud)
但我想使用res.render('index',输出)代替.
例如:
@RunWith(MockitoJUnitRunner.class)
public class ClientFormServiceTest {
@Mock
ClientFormService clientFormService;
public class GetNewClientFormTest {
@Mock
protected ClientForm result;
@Before
public void given() {
result = clientFormService.getNewForm();
}
@Test
public void should_do_something() {
}
}
public class CreateClientFormTest {
@Mock
protected ClientForm clientForm;
@Before
public void given() {
clientFormService.createForm(clientForm);
}
@Test
public void should_do_something() {
}
}
Run Code Online (Sandbox Code Playgroud)
}
这是我想要做的但是如果嵌套到类中我不能运行单元测试.