tests: use custom benchmarking solution instead of outdated jest-bench package (#4468)

* Remove jest-bench dependency and use custom solutions

* review

* Update tests/bench/calculateRank.bench.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2025-10-01 22:20:32 +03:00
1 parent 651de3afe4
commit 0d60641b7c
8 files changed
+157 -303

No files matched your search

+5 -5
View File
@@ -1,8 +1,8 @@
import { benchmarkSuite } from "jest-bench";
import api from "../../api/index.js";
import axios from "axios";
import MockAdapter from "axios-mock-adapter";
import { jest } from "@jest/globals";
import { it, jest } from "@jest/globals";
import { runAndLogStats } from "./utils.js";
const stats = {
name: "Anurag Hazra",
@@ -69,10 +69,10 @@ const faker = (query, data) => {
return { req, res };
};
benchmarkSuite("test /api", {
["simple request"]: async () => {
it("test /api", async () => {
await runAndLogStats("test /api", async () => {
const { req, res } = faker({}, data_stats);
await api(req, res);
},
});
});