test: add empty item test case

This commit is contained in:
DIYgod
2019-06-13 12:01:07 +08:00
parent cbcfc03207
commit 76add4785a
4 changed files with 21 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ module.exports = async (ctx, next) => {
await next();
if (ctx.state.data && (!ctx.state.data.item || ctx.state.data.item.length === 0)) {
throw Error('该路由目前获取内容为空,请检查源站情况或前往 https://github.com/DIYgod/RSSHub/issues 反馈该问题');
throw Error('this route is empty, please check the origin site or create an issue to feedback on https://github.com/DIYgod/RSSHub/issues/new/choose');
}
// decode HTML entities