diff options
| author | Shinigami <[email protected]> | 2025-07-04 20:23:30 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-04 18:23:30 +0000 |
| commit | 623d2741a4ca165596fad7fede2f850b6c08aa3a (patch) | |
| tree | c05531e1f25bea9201925c0342d22e9a50f8946f /test/modules/image.spec.ts | |
| parent | 160960b79719e1298668a7ebba390b30b8de1080 (diff) | |
| download | faker-623d2741a4ca165596fad7fede2f850b6c08aa3a.tar.xz faker-623d2741a4ca165596fad7fede2f850b6c08aa3a.zip | |
refactor!: remove deprecations (#3553)
Diffstat (limited to 'test/modules/image.spec.ts')
| -rw-r--r-- | test/modules/image.spec.ts | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/test/modules/image.spec.ts b/test/modules/image.spec.ts index 501a7a76..56fa0173 100644 --- a/test/modules/image.spec.ts +++ b/test/modules/image.spec.ts @@ -24,7 +24,7 @@ function assertValidUrl(address: string): void { describe('image', () => { seededTests(faker, 'image', (t) => { - t.itEach('avatar', 'avatarGitHub', 'avatarLegacy'); + t.itEach('avatar', 'avatarGitHub'); t.describe('url', (t) => { t.it('noArgs') @@ -61,33 +61,6 @@ describe('image', () => { }); }); - t.describe('urlPlaceholder', (t) => { - t.it('noArgs') - .it('with width', { width: 128 }) - .it('with height', { height: 128 }) - .it('with width and height', { width: 128, height: 128 }) - .it('with backgroundColor', { backgroundColor: 'FF0000' }) - .it('with textColor', { textColor: '0000FF' }) - .it('with format', { format: 'webp' }) - .it('with text', { text: 'Hello' }) - .it('with all options', { - width: 128, - height: 128, - backgroundColor: 'FF0000', - textColor: '0000FF', - format: 'png', - text: 'hello', - }) - .it('with empty colors and text', { - width: 128, - height: 128, - backgroundColor: '', - textColor: '', - format: 'png', - text: '', - }); - }); - t.describe('dataUri', (t) => { t.it('noArgs') .it('with width', { width: 128 }) @@ -137,19 +110,6 @@ describe('image', () => { }); }); - describe('avatarLegacy', () => { - it('should return a random avatar url from cloudflare-ipfs', () => { - const actual = faker.image.avatarLegacy(); - - expect(actual).toBeTypeOf('string'); - expect(actual).toMatch( - /^https:\/\/cloudflare-ipfs\.com\/ipfs\/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye\/avatar\/\d{1,4}\.jpg$/ - ); - // The links aren't working anymore - there is nothing we can do about it - // assertWebAddress(avatarUrl); - }); - }); - describe('personPortrait', () => { it('should return a random avatar url from AI', () => { const imageUrl = faker.image.personPortrait(); @@ -228,17 +188,6 @@ describe('image', () => { }); }); - describe('urlPlaceholder', () => { - it('should return a random image url from Placeholder', () => { - const actual = faker.image.urlPlaceholder(); - - assertValidUrl(actual); - expect(actual).toMatch( - /^https:\/\/via\.placeholder\.com\/\d+x\d+\/[0-9a-fA-F]{6}\/[0-9a-fA-F]{6}\.[a-z]{3,4}\?text=.+$/ - ); - }); - }); - describe('dataUri', () => { it('should return an image data uri', () => { const actual = faker.image.dataUri(); |
