Skip to content

Commit 439fff9

Browse files
committed
chore: fix function name to keep samely
1 parent b72240f commit 439fff9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

common/template/template.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { showLogs } = require('../../common/utils/withTimeLog');
1+
const { showLogs } = require('../utils/showLogs');
22
/**
33
* @题目
44
* @描述

common/utils/showLogs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const { setDataStructure } = require('./parseStructure');
1010
* @param compare
1111
* @returns {{预期结果: string, 执行结果: string, 内存占用: string, 测试结果: (string), 执行用时: string}}
1212
*/
13-
function withTimeLog(fnName, param, compare, compareStruct) {
13+
function showLogs(fnName, param, compare, compareStruct) {
1414
// 记录开始时间
1515
const startTime = performance.now();
1616
// 获取函数执行前的内存使用情况
@@ -40,7 +40,7 @@ function showLogs(fnName, paramMap, compareMap) {
4040

4141
paramArr.forEach((param, index) => {
4242
const pasedParma = setDataStructure(param, paramStruct);
43-
const logItem = withTimeLog(fnName, pasedParma, compareArr[index], compareStruct);
43+
const logItem = showLogs(fnName, pasedParma, compareArr[index], compareStruct);
4444
logsItems.push(logItem);
4545
});
4646
console.table(logsItems);

test/setDataStructure.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
import {test, expect, describe} from 'vitest';
3-
const { showLogs } = require("../common/utils/withTimeLog");
3+
const { showLogs } = require("../common/utils/showLogs");
44
const { ListNode, convertListNode } = require("../common/structures/ListNode");
55
import { getDataStructure } from "../common/utils/parseStructure";
66

0 commit comments

Comments
 (0)