better example
This commit is contained in:
parent
af4585ee2f
commit
54e86e4722
1 changed files with 7 additions and 4 deletions
|
@ -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 */);
|
||||
});
|
||||
}
|
||||
});
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue