aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorShinigami <[email protected]>2022-12-10 20:09:18 +0100
committerGitHub <[email protected]>2022-12-10 20:09:18 +0100
commitab9fa1fe5bab671c1888663151ae20374f409c4a (patch)
treee1b6f7de5630f2e88a2c269b03b17ca15c0103b8 /test
parente4839a9fc91d0ffc36c2015b34fcba33a6797bb4 (diff)
downloadfaker-ab9fa1fe5bab671c1888663151ae20374f409c4a.tar.xz
faker-ab9fa1fe5bab671c1888663151ae20374f409c4a.zip
fix(image)!: remove lorempixel (#1641)
Diffstat (limited to 'test')
-rw-r--r--test/image.spec.ts49
1 files changed, 1 insertions, 48 deletions
diff --git a/test/image.spec.ts b/test/image.spec.ts
index 8ec9b05e..9cc8f500 100644
--- a/test/image.spec.ts
+++ b/test/image.spec.ts
@@ -88,7 +88,7 @@ describe('image', () => {
describe('lorempicsum', () => {
describe('imageUrl()', () => {
- it('should return a random image url from lorempixel', () => {
+ it('should return a random image url from lorem picsum', () => {
const imageUrl = faker.image.lorempicsum.imageUrl();
expect(imageUrl).toBe('https://picsum.photos/640/480');
@@ -167,53 +167,6 @@ describe('image', () => {
});
});
- describe('lorempixel', () => {
- describe('imageUrl()', () => {
- it('should return a random image url from lorempixel', () => {
- const imageUrl = faker.image.lorempixel.imageUrl();
-
- expect(imageUrl).toBe('https://lorempixel.com/640/480');
- });
-
- it('should return a random image url from lorempixel with width and height', () => {
- const imageUrl = faker.image.lorempixel.imageUrl(100, 100);
-
- expect(imageUrl).toBe('https://lorempixel.com/100/100');
- });
-
- it('should return a random image url for a specified category', () => {
- const imageUrl = faker.image.lorempixel.imageUrl(100, 100, 'abstract');
-
- expect(imageUrl).toBe('https://lorempixel.com/100/100/abstract');
- });
- });
-
- const categories = [
- 'abstract',
- 'animals',
- 'business',
- 'cats',
- 'city',
- 'food',
- 'nightlife',
- 'fashion',
- 'people',
- 'nature',
- 'sports',
- 'technics',
- 'transport',
- ];
-
- for (const category of categories) {
- describe(`${category}()`, () => {
- it(`should return a random ${category} image url`, () => {
- const actual = faker.image.lorempixel[category]();
- expect(actual).toBe(`https://lorempixel.com/640/480/${category}`);
- });
- });
- }
- });
-
describe('unsplash', () => {
describe('imageUrl()', () => {
it('should return a random image url from unsplash', () => {