mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 23:00:48 +08:00
test: fix debug test case
This commit is contained in:
@@ -19,14 +19,14 @@ module.exports = async (ctx) => {
|
||||
const hotRoutes = routes.slice(0, 30);
|
||||
let hotRoutesValue = '';
|
||||
hotRoutes.forEach((item) => {
|
||||
hotRoutesValue += `${ctx.debug.routes[item]} ${item}<br>`;
|
||||
hotRoutesValue += `${ctx.debug.routes[item]} ${item}<br>`;
|
||||
});
|
||||
|
||||
const paths = Object.keys(ctx.debug.paths).sort((a, b) => ctx.debug.paths[b] - ctx.debug.paths[a]);
|
||||
const hotPaths = paths.slice(0, 30);
|
||||
let hotPathsValue = '';
|
||||
hotPaths.forEach((item) => {
|
||||
hotPathsValue += `${ctx.debug.paths[item]} ${item}<br>`;
|
||||
hotPathsValue += `${ctx.debug.paths[item]} ${item}<br>`;
|
||||
});
|
||||
|
||||
let hotErrorRoutesValue = '';
|
||||
@@ -34,7 +34,7 @@ module.exports = async (ctx) => {
|
||||
const errorRoutes = Object.keys(ctx.debug.errorRoutes).sort((a, b) => ctx.debug.errorRoutes[b] - ctx.debug.errorRoutes[a]);
|
||||
const hotErrorRoutes = errorRoutes.slice(0, 30);
|
||||
hotErrorRoutes.forEach((item) => {
|
||||
hotErrorRoutesValue += `${ctx.debug.errorRoutes[item]} ${item}<br>`;
|
||||
hotErrorRoutesValue += `${ctx.debug.errorRoutes[item]} ${item}<br>`;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ module.exports = async (ctx) => {
|
||||
const errorPaths = Object.keys(ctx.debug.errorPaths).sort((a, b) => ctx.debug.errorPaths[b] - ctx.debug.errorPaths[a]);
|
||||
const hotErrorPaths = errorPaths.slice(0, 30);
|
||||
hotErrorPaths.forEach((item) => {
|
||||
hotErrorPathsValue += `${ctx.debug.errorPaths[item]} ${item}<br>`;
|
||||
hotErrorPathsValue += `${ctx.debug.errorPaths[item]} ${item}<br>`;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ module.exports = async (ctx) => {
|
||||
const hotIPs = ips.slice(0, 50);
|
||||
let hotIPsValue = '';
|
||||
hotIPs.forEach((item) => {
|
||||
hotIPsValue += `${ctx.debug.ips[item]} ${item}<br>`;
|
||||
hotIPsValue += `${ctx.debug.ips[item]} ${item}<br>`;
|
||||
});
|
||||
|
||||
let showDebug;
|
||||
|
||||
Reference in New Issue
Block a user