路由懒加载,测试环境出现警告

问题遇到的现象和发生背景

路由懒加载,test环境出现警告

问题相关代码,请勿粘贴截图

routerArr.push({
path: path == "home" ? '/' :'/'+path,//home 默认为根组件
name: componentName,
component: process.env.NODE_ENV == 'test' ? () => require(/* webpackChunkName: "alarm" / ../views${componentLocation}) : () => import(/ webpackChunkName: "alarm" */ ../views${componentLocation})
})

运行结果及报错内容

[Vue Router warn]: Component "default" in record with path "/" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.

我的解答思路和尝试过的方法
我想要达到的结果

去掉警告