better example

This commit is contained in:
Mylloon 2024-09-27 12:39:38 +02:00
parent af4585ee2f
commit 54e86e4722
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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 */);
});
}
});
```