Re enable test in debug

This commit is contained in:
Arnaud 2024-09-13 20:45:30 +02:00
parent 73b395f714
commit e943a2ffa9
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663
2 changed files with 10 additions and 10 deletions

View File

@ -30,13 +30,16 @@ describe("debug", () => {
});
});
// it("returns a success when trying to setup the log level with a correct value", async (t) => {
// const spy = vi.spyOn(Fetch, "safe");
it("returns a success when trying to setup the log level with a correct value", async (t) => {
const mockResponse = {
ok: true,
status: 200,
text: async () => "",
} as Response;
globalThis.fetch = vi.fn().mockResolvedValue(mockResponse);
// expect(spy).toHaveBeenCalledTimes(1);
const response = await debug.setLogLevel("ERROR");
// const response = await debug.setLogLevel("ERROR");
// assert.deepStrictEqual(response, { error: false, data: true });
// });
assert.deepStrictEqual(response, { error: false, data: "" });
});
});

View File

@ -220,9 +220,6 @@ export class CodexMarketplace {
const res = await Fetch.safe(url, {
method: "POST",
// headers: {
// "content-type": "application/json",
// },
body: JSON.stringify({
duration: duration.toString(),
reward: reward.toString(),