File tree 1 file changed +1
-19
lines changed
1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -10,24 +10,6 @@ This document builds on the [default contributing.md](https://github.com/comcode
10
10
11
11
### Creating tests
12
12
13
- 1 . For some module ` foo.ts ` , create a file ` foo.test.ts ` in the same directory.
14
- - Tests must be within ` /src ` .
15
- - ` .tsx ` ` .mjs ` ` .jsx ` and ` .js ` are also valid extensions.
16
- 2 . Import required jest utils from ` @jest/globals ` , and the module to be tested.
17
- 3 . Use ` describe ` to log what code is being tested and use ` it ` to describe a specification of the module.
18
-
19
- ``` ts
20
- /** @file criticalMathModule.test.ts */
21
- import { describe , expect , it } from " @jest/globals" ;
22
- import { isEven } from " ./criticalMathModule" ;
23
-
24
- describe (" criticalMathModule" , () => {
25
- // read as: it checks if numbers are even
26
- it (" checks if numbers are even" , () => {
27
- expect (isEven (1 )).toBe (false );
28
- expect (isEven (4 )).toBe (true );
29
- });
30
- });
31
- ```
13
+ Test files must be within ` /src ` , with a file name ending in ` .test.<ext> ` , where ` <ext> ` is one of ` js ` ` mjs ` ` jsx ` ` ts ` ` tsx ` .
32
14
33
15
## How to review a code change
You can’t perform that action at this time.
0 commit comments