@@ -8,33 +8,33 @@ const wrapAsync = callback => {
8
8
} ;
9
9
10
10
metatests . test ( 'simple chain/do' , test => {
11
- const readConfig = ( name , callback ) => {
11
+ const readConfig = test . mustCall ( ( name , callback ) => {
12
12
test . strictSame ( name , 'myConfig' ) ;
13
13
wrapAsync ( ( ) => {
14
14
callback ( null , { name } ) ;
15
15
} ) ;
16
- } ;
16
+ } ) ;
17
17
18
- const selectFromDb = ( query , callback ) => {
18
+ const selectFromDb = test . mustCall ( ( query , callback ) => {
19
19
test . strictSame ( query , 'select * from cities' ) ;
20
20
wrapAsync ( ( ) => {
21
21
callback ( null , [ { name : 'Kiev' } , { name : 'Roma' } ] ) ;
22
22
} ) ;
23
- } ;
23
+ } ) ;
24
24
25
- const getHttpPage = ( url , callback ) => {
25
+ const getHttpPage = test . mustCall ( ( url , callback ) => {
26
26
test . strictSame ( url , 'http://kpi.ua' ) ;
27
27
wrapAsync ( ( ) => {
28
28
callback ( null , '<html>Some archaic web here</html>' ) ;
29
29
} ) ;
30
- } ;
30
+ } ) ;
31
31
32
- const readFile = ( path , callback ) => {
32
+ const readFile = test . mustCall ( ( path , callback ) => {
33
33
test . strictSame ( path , 'README.md' ) ;
34
34
wrapAsync ( ( ) => {
35
35
callback ( null , 'file content' ) ;
36
36
} ) ;
37
- } ;
37
+ } ) ;
38
38
39
39
const c1 = metasync
40
40
. do ( readConfig , 'myConfig' )
0 commit comments