From 54e86e4722d3c4489c631f042e59ca9dafbf595a Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 27 Sep 2024 12:39:38 +0200 Subject: [PATCH] better example --- CONTRIBUTING.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a2d73e5..2bf5e9a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -294,9 +294,12 @@ Il est souhaité d'écrire des tests quand cela est possible. // eslint-disable-next-line @typescript-eslint/no-require-imports const { fnReturnsTrue } = require("../src/utils/misc"); -describe("test description", () => { - test("test name", () => { - expect(fnReturnsTrue() /* function to test */).toBe(true /* expected result */); - }); +describe("test name", () => { + { + const name = "to be tested"; + test(name, () => { + expect(fnReturnsTrue() /* function to test */).toBe(true /* expected result */); + }); + } }); ```