1- import fakeAge from './index.js' ;
1+ import age from './index.js' ;
22import test from 'ava' ;
33
4- test ( 'fakeAge return type to be number' , t => {
5- t . is ( typeof fakeAge ( ) , 'number' ) ;
4+ test ( 'age return type to be number' , t => {
5+ t . is ( typeof age ( ) , 'number' ) ;
66} ) ;
77
8- test ( 'fakeAge with type child less than 13 and more than -1' , t => {
9- t . true ( fakeAge ( { type : 'child' } ) < 13 ) ;
10- t . true ( fakeAge ( { type : 'child' } ) > - 1 ) ;
8+ test ( 'age with type child less than 13 and more than -1' , t => {
9+ t . true ( age ( { type : 'child' } ) < 13 ) ;
10+ t . true ( age ( { type : 'child' } ) > - 1 ) ;
1111} ) ;
1212
13- test ( 'fakeAge with type teen less than 20 and more than 12' , t => {
14- t . true ( fakeAge ( { type : 'teen' } ) < 20 ) ;
15- t . true ( fakeAge ( { type : 'teen' } ) > 12 ) ;
13+ test ( 'age with type teen less than 20 and more than 12' , t => {
14+ t . true ( age ( { type : 'teen' } ) < 20 ) ;
15+ t . true ( age ( { type : 'teen' } ) > 12 ) ;
1616} ) ;
1717
18- test ( 'fakeAge with type adult less than 69 and more than 17' , t => {
19- t . true ( fakeAge ( { type : 'adult' } ) < 69 ) ;
20- t . true ( fakeAge ( { type : 'adult' } ) > 17 ) ;
18+ test ( 'age with type adult less than 69 and more than 17' , t => {
19+ t . true ( age ( { type : 'adult' } ) < 69 ) ;
20+ t . true ( age ( { type : 'adult' } ) > 17 ) ;
2121} ) ;
2222
23- test ( 'fakeAge with type senior less than 101 and more than 64' , t => {
24- t . true ( fakeAge ( { type : 'senior' } ) < 101 ) ;
25- t . true ( fakeAge ( { type : 'senior' } ) > 64 ) ;
23+ test ( 'age with type senior less than 101 and more than 64' , t => {
24+ t . true ( age ( { type : 'senior' } ) < 101 ) ;
25+ t . true ( age ( { type : 'senior' } ) > 64 ) ;
2626} ) ;
2727
28- test ( 'fakeAge with type all less than 101 and more than -1' , t => {
29- t . true ( fakeAge ( { type : 'all' } ) < 101 ) ;
30- t . true ( fakeAge ( { type : 'all' } ) > - 1 ) ;
28+ test ( 'age with type all less than 101 and more than -1' , t => {
29+ t . true ( age ( { type : 'all' } ) < 101 ) ;
30+ t . true ( age ( { type : 'all' } ) > - 1 ) ;
3131} ) ;
0 commit comments