From 6c13fe0a86bb44c48e20c38b1ea600f9aa39446a Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Sun, 29 Dec 2024 16:40:37 +0100 Subject: refactor(image): deprecate urlPlaceholder (#3341) --- test/integration/modules/image.spec.ts | 1 + test/modules/__snapshots__/image.spec.ts.snap | 42 +++++++++++++-------------- test/modules/image.spec.ts | 1 + 3 files changed, 23 insertions(+), 21 deletions(-) (limited to 'test') diff --git a/test/integration/modules/image.spec.ts b/test/integration/modules/image.spec.ts index 13b37a70..611317c6 100644 --- a/test/integration/modules/image.spec.ts +++ b/test/integration/modules/image.spec.ts @@ -112,6 +112,7 @@ describe('image', () => { describe('urlPlaceholder', () => { it('should return a random image url from Placeholder', async () => { + // eslint-disable-next-line @typescript-eslint/no-deprecated const actual = faker.image.urlPlaceholder(); await assertWorkingUrl(actual); }); diff --git a/test/modules/__snapshots__/image.spec.ts.snap b/test/modules/__snapshots__/image.spec.ts.snap index adc91e42..bccdada4 100644 --- a/test/modules/__snapshots__/image.spec.ts.snap +++ b/test/modules/__snapshots__/image.spec.ts.snap @@ -56,23 +56,23 @@ exports[`image > 42 > urlPicsumPhotos > with width 1`] = `"https://picsum.photos exports[`image > 42 > urlPicsumPhotos > with width and height 1`] = `"https://picsum.photos/seed/B993RBH1Y/128/128?grayscale&blur=10"`; -exports[`image > 42 > urlPlaceholder > noArgs 1`] = `"https://via.placeholder.com/1498x3802/ad331d/df0fc4.gif?text=auctus%20cognomen%20esse"`; +exports[`image > 42 > urlPlaceholder > noArgs 1`] = `"https://via.placeholder.com/1311x3328/ad331d/df0fc4.gif?text=auctus%20cognomen%20esse"`; exports[`image > 42 > urlPlaceholder > with all options 1`] = `"https://via.placeholder.com/128x128/FF0000/0000FF.png?text=hello"`; -exports[`image > 42 > urlPlaceholder > with backgroundColor 1`] = `"https://via.placeholder.com/1498x3802/FF0000/ad331d.png?text=suggero%20accusator%20volubilis"`; +exports[`image > 42 > urlPlaceholder > with backgroundColor 1`] = `"https://via.placeholder.com/1311x3328/FF0000/ad331d.png?text=suggero%20accusator%20volubilis"`; exports[`image > 42 > urlPlaceholder > with empty colors and text 1`] = `"https://via.placeholder.com/128x128//.png?text="`; -exports[`image > 42 > urlPlaceholder > with format 1`] = `"https://via.placeholder.com/1498x3802/ad331d/df0fc4.webp?text=attonbitus%20auctus%20cognomen"`; +exports[`image > 42 > urlPlaceholder > with format 1`] = `"https://via.placeholder.com/1311x3328/ad331d/df0fc4.webp?text=attonbitus%20auctus%20cognomen"`; -exports[`image > 42 > urlPlaceholder > with height 1`] = `"https://via.placeholder.com/1498x128/ead331/ddf0fc.jpeg?text=attonbitus%20auctus%20cognomen"`; +exports[`image > 42 > urlPlaceholder > with height 1`] = `"https://via.placeholder.com/1311x128/ead331/ddf0fc.jpeg?text=attonbitus%20auctus%20cognomen"`; -exports[`image > 42 > urlPlaceholder > with text 1`] = `"https://via.placeholder.com/1498x3802/ad331d/df0fc4.gif?text=Hello"`; +exports[`image > 42 > urlPlaceholder > with text 1`] = `"https://via.placeholder.com/1311x3328/ad331d/df0fc4.gif?text=Hello"`; -exports[`image > 42 > urlPlaceholder > with textColor 1`] = `"https://via.placeholder.com/1498x3802/ad331d/0000FF.png?text=suggero%20accusator%20volubilis"`; +exports[`image > 42 > urlPlaceholder > with textColor 1`] = `"https://via.placeholder.com/1311x3328/ad331d/0000FF.png?text=suggero%20accusator%20volubilis"`; -exports[`image > 42 > urlPlaceholder > with width 1`] = `"https://via.placeholder.com/128x1498/ead331/ddf0fc.jpeg?text=attonbitus%20auctus%20cognomen"`; +exports[`image > 42 > urlPlaceholder > with width 1`] = `"https://via.placeholder.com/128x1311/ead331/ddf0fc.jpeg?text=attonbitus%20auctus%20cognomen"`; exports[`image > 42 > urlPlaceholder > with width and height 1`] = `"https://via.placeholder.com/128x128/8ead33/1ddf0f.webp?text=benevolentia%20attonbitus%20auctus"`; @@ -132,23 +132,23 @@ exports[`image > 1211 > urlPicsumPhotos > with width 1`] = `"https://picsum.phot exports[`image > 1211 > urlPicsumPhotos > with width and height 1`] = `"https://picsum.photos/seed/ZFGLlH/128/128?blur=9"`; -exports[`image > 1211 > urlPlaceholder > noArgs 1`] = `"https://via.placeholder.com/3714x3573/4fefa7/fbaec9.webp?text=unde%20blanditiis%20officia"`; +exports[`image > 1211 > urlPlaceholder > noArgs 1`] = `"https://via.placeholder.com/3250x3128/4fefa7/fbaec9.webp?text=unde%20blanditiis%20officia"`; exports[`image > 1211 > urlPlaceholder > with all options 1`] = `"https://via.placeholder.com/128x128/FF0000/0000FF.png?text=hello"`; -exports[`image > 1211 > urlPlaceholder > with backgroundColor 1`] = `"https://via.placeholder.com/3714x3573/FF0000/4fefa7.png?text=tonsor%20tenuis%20sollers"`; +exports[`image > 1211 > urlPlaceholder > with backgroundColor 1`] = `"https://via.placeholder.com/3250x3128/FF0000/4fefa7.png?text=tonsor%20tenuis%20sollers"`; exports[`image > 1211 > urlPlaceholder > with empty colors and text 1`] = `"https://via.placeholder.com/128x128//.png?text="`; -exports[`image > 1211 > urlPlaceholder > with format 1`] = `"https://via.placeholder.com/3714x3573/4fefa7/fbaec9.webp?text=usque%20unde%20blanditiis"`; +exports[`image > 1211 > urlPlaceholder > with format 1`] = `"https://via.placeholder.com/3250x3128/4fefa7/fbaec9.webp?text=usque%20unde%20blanditiis"`; -exports[`image > 1211 > urlPlaceholder > with height 1`] = `"https://via.placeholder.com/3714x128/d4fefa/7fbaec.jpg?text=usque%20unde%20blanditiis"`; +exports[`image > 1211 > urlPlaceholder > with height 1`] = `"https://via.placeholder.com/3250x128/d4fefa/7fbaec.jpg?text=usque%20unde%20blanditiis"`; -exports[`image > 1211 > urlPlaceholder > with text 1`] = `"https://via.placeholder.com/3714x3573/4fefa7/fbaec9.webp?text=Hello"`; +exports[`image > 1211 > urlPlaceholder > with text 1`] = `"https://via.placeholder.com/3250x3128/4fefa7/fbaec9.webp?text=Hello"`; -exports[`image > 1211 > urlPlaceholder > with textColor 1`] = `"https://via.placeholder.com/3714x3573/4fefa7/0000FF.png?text=tonsor%20tenuis%20sollers"`; +exports[`image > 1211 > urlPlaceholder > with textColor 1`] = `"https://via.placeholder.com/3250x3128/4fefa7/0000FF.png?text=tonsor%20tenuis%20sollers"`; -exports[`image > 1211 > urlPlaceholder > with width 1`] = `"https://via.placeholder.com/128x3714/d4fefa/7fbaec.jpg?text=usque%20unde%20blanditiis"`; +exports[`image > 1211 > urlPlaceholder > with width 1`] = `"https://via.placeholder.com/128x3250/d4fefa/7fbaec.jpg?text=usque%20unde%20blanditiis"`; exports[`image > 1211 > urlPlaceholder > with width and height 1`] = `"https://via.placeholder.com/128x128/ed4fef/a7fbae.webp?text=dapifer%20usque%20unde"`; @@ -208,22 +208,22 @@ exports[`image > 1337 > urlPicsumPhotos > with width 1`] = `"https://picsum.phot exports[`image > 1337 > urlPicsumPhotos > with width and height 1`] = `"https://picsum.photos/seed/sjwgYJ/128/128?grayscale&blur=1"`; -exports[`image > 1337 > urlPlaceholder > noArgs 1`] = `"https://via.placeholder.com/1048x635/6a7b5f/a28d2f.jpg?text=testimonium%20thalassinus%20contra"`; +exports[`image > 1337 > urlPlaceholder > noArgs 1`] = `"https://via.placeholder.com/918x556/6a7b5f/a28d2f.jpg?text=testimonium%20thalassinus%20contra"`; exports[`image > 1337 > urlPlaceholder > with all options 1`] = `"https://via.placeholder.com/128x128/FF0000/0000FF.png?text=hello"`; -exports[`image > 1337 > urlPlaceholder > with backgroundColor 1`] = `"https://via.placeholder.com/1048x635/FF0000/6a7b5f.png?text=ancilla%20creptio%20quisquam"`; +exports[`image > 1337 > urlPlaceholder > with backgroundColor 1`] = `"https://via.placeholder.com/918x556/FF0000/6a7b5f.png?text=ancilla%20creptio%20quisquam"`; exports[`image > 1337 > urlPlaceholder > with empty colors and text 1`] = `"https://via.placeholder.com/128x128//.png?text="`; -exports[`image > 1337 > urlPlaceholder > with format 1`] = `"https://via.placeholder.com/1048x635/6a7b5f/a28d2f.webp?text=decipio%20testimonium%20thalassinus"`; +exports[`image > 1337 > urlPlaceholder > with format 1`] = `"https://via.placeholder.com/918x556/6a7b5f/a28d2f.webp?text=decipio%20testimonium%20thalassinus"`; -exports[`image > 1337 > urlPlaceholder > with height 1`] = `"https://via.placeholder.com/1048x128/36a7b5/fa28d2.webp?text=decipio%20testimonium%20thalassinus"`; +exports[`image > 1337 > urlPlaceholder > with height 1`] = `"https://via.placeholder.com/918x128/36a7b5/fa28d2.webp?text=decipio%20testimonium%20thalassinus"`; -exports[`image > 1337 > urlPlaceholder > with text 1`] = `"https://via.placeholder.com/1048x635/6a7b5f/a28d2f.jpg?text=Hello"`; +exports[`image > 1337 > urlPlaceholder > with text 1`] = `"https://via.placeholder.com/918x556/6a7b5f/a28d2f.jpg?text=Hello"`; -exports[`image > 1337 > urlPlaceholder > with textColor 1`] = `"https://via.placeholder.com/1048x635/6a7b5f/0000FF.png?text=ancilla%20creptio%20quisquam"`; +exports[`image > 1337 > urlPlaceholder > with textColor 1`] = `"https://via.placeholder.com/918x556/6a7b5f/0000FF.png?text=ancilla%20creptio%20quisquam"`; -exports[`image > 1337 > urlPlaceholder > with width 1`] = `"https://via.placeholder.com/128x1048/36a7b5/fa28d2.webp?text=decipio%20testimonium%20thalassinus"`; +exports[`image > 1337 > urlPlaceholder > with width 1`] = `"https://via.placeholder.com/128x918/36a7b5/fa28d2.webp?text=decipio%20testimonium%20thalassinus"`; exports[`image > 1337 > urlPlaceholder > with width and height 1`] = `"https://via.placeholder.com/128x128/536a7b/5fa28d.gif?text=vorago%20decipio%20testimonium"`; diff --git a/test/modules/image.spec.ts b/test/modules/image.spec.ts index 36be582d..2f9b0f02 100644 --- a/test/modules/image.spec.ts +++ b/test/modules/image.spec.ts @@ -202,6 +202,7 @@ describe('image', () => { describe('urlPlaceholder', () => { it('should return a random image url from Placeholder', () => { + // eslint-disable-next-line @typescript-eslint/no-deprecated const actual = faker.image.urlPlaceholder(); assertValidUrl(actual); -- cgit v1.2.3