在我的应用程序中,我有这个初始化程序,它将商店注入所有服务:
export function initialize(container, application) {
application.inject('service', 'store', 'store:main');
}
export default {
name: 'inject-store-in-services',
initialize: initialize
};
Run Code Online (Sandbox Code Playgroud)
我的问题是,当我运行单元测试时,服务没有store属性.所以我的问题是:有没有办法实现我的初始化程序在单元测试上下文中的作用?