js-waku/packages/tests/tests/log_file.node.spec.ts
Florin Barbu de5be4413b
chore: use graceful timeout mechanism (#1841)
* use graceful timeout mechanism

* set max timeout for all hooks

* small fix

* small fix

* use MOCHA_HOOK_MAX_TIMEOUT as default timeoutDuration

* force retry even when the hook fails

* use custom hooks

* fix global timeout problem

* fix unwanted change

* fix enr issue

* force retry on before error as well
2024-02-15 08:50:03 +02:00

22 lines
534 B
TypeScript

import { expect } from "chai";
import { beforeEachCustom, makeLogFileName } from "../src/index.js";
describe("This", function () {
describe("Is", function () {
it("A test", function () {
expect(makeLogFileName(this)).to.equal("This_Is_A_test");
});
});
describe("Is also", function () {
let testName: string;
beforeEachCustom(this, async () => {
testName = makeLogFileName(this.ctx);
});
it("A test", function () {
expect(testName).to.equal("This_Is_also_A_test");
});
});
});