Skip to content

Commit

Permalink
📝 update test doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Yago committed Jun 25, 2021
1 parent 91686bd commit e087bd7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/tests-handbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ There is no magic rule here, but depending of the time and budget of your projec

## Unit tests

To create a new unit test: simple create a new file beside the file you want to test with the suffix `.spec`. For example:
To create a new unit test: simple create a new file in a `__tests__` sub directory with the suffix `.spec`. For example:

```plain
.
├── my-script.ts
└── my-script.spec.ts
└── __tests__
└── my-script.spec.ts
```

Then write your test using mainly only the [Jest API](https://jestjs.io/docs/en/expect).
Expand Down

0 comments on commit e087bd7

Please sign in to comment.