diff options
| author | Caleb Burton <[email protected]> | 2022-01-25 12:16:45 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-25 18:16:45 +0100 |
| commit | bbc67aa2cb60b5fe03d9a77a111045822e461f02 (patch) | |
| tree | 89c044c9af43a27b354d450a4b41baebeeb8f361 /test | |
| parent | 4406816a12714988b9ecac5832108ee2dfc10d23 (diff) | |
| download | faker-bbc67aa2cb60b5fe03d9a77a111045822e461f02.tar.xz faker-bbc67aa2cb60b5fe03d9a77a111045822e461f02.zip | |
docs: readme cleanup (#251)
Diffstat (limited to 'test')
| -rw-r--r-- | test/random.spec.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/random.spec.ts b/test/random.spec.ts index ad1951be..727dae14 100644 --- a/test/random.spec.ts +++ b/test/random.spec.ts @@ -235,6 +235,20 @@ describe('random.js', () => { }); }); + describe('image', () => { + it('random.image() uses image module and prints deprecation warning', () => { + const spy_console_log = vi.spyOn(console, 'log'); + const spy_image_image = vi.spyOn(faker.image, 'image'); + faker.random.image(); + expect(spy_image_image).toHaveBeenCalled(); + expect(spy_console_log).toHaveBeenCalledWith( + 'Deprecation Warning: faker.random.image is now located in faker.image.image' + ); + spy_image_image.mockRestore(); + spy_console_log.mockRestore(); + }); + }); + describe('mersenne twister', () => { it('returns a random number without given min / max arguments', () => { const randomNumber = mersenne.rand(); |
