|
| 1 | +import test from 'ava'; |
| 2 | +import faker from './index.js'; |
| 3 | + |
| 4 | +test('faker return type to be object', t => { |
| 5 | + t.is(typeof faker, 'object'); |
| 6 | +}); |
| 7 | + |
| 8 | +test('faker boolean return type to be boolean', t => { |
| 9 | + t.is(typeof faker.boolean(), 'boolean'); |
| 10 | +}); |
| 11 | + |
| 12 | +test('faker string return type to be string', t => { |
| 13 | + t.is(typeof faker.string(), 'string'); |
| 14 | +}); |
| 15 | + |
| 16 | +test('faker age return type to be number', t => { |
| 17 | + t.is(typeof faker.age(), 'number'); |
| 18 | +}); |
| 19 | + |
| 20 | +test('faker animal return type to be string', t => { |
| 21 | + t.is(typeof faker.animal(), 'string'); |
| 22 | +}); |
| 23 | + |
| 24 | +test('faker integer return type to be number', t => { |
| 25 | + t.is(typeof faker.integer(), 'number'); |
| 26 | +}); |
| 27 | + |
| 28 | +test('faker float return type to be number', t => { |
| 29 | + t.is(typeof faker.float(), 'number'); |
| 30 | +}); |
| 31 | + |
| 32 | +test('faker gende return type to be string', t => { |
| 33 | + t.is(typeof faker.gender(), 'string'); |
| 34 | +}); |
| 35 | + |
| 36 | +test('faker superhero return type to be string', t => { |
| 37 | + t.is(typeof faker.superhero(), 'string'); |
| 38 | +}); |
| 39 | + |
| 40 | +test('faker profession return type to be string', t => { |
| 41 | + t.is(typeof faker.profession(), 'string'); |
| 42 | +}); |
| 43 | + |
| 44 | +test('faker ip return type to be string', t => { |
| 45 | + t.is(typeof faker.ip(), 'string'); |
| 46 | +}); |
| 47 | + |
| 48 | +test('faker letter return type to be string', t => { |
| 49 | + t.is(typeof faker.letter(), 'string'); |
| 50 | +}); |
0 commit comments