aboutsummaryrefslogtreecommitdiff
path: root/test/modules/image.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/modules/image.spec.ts')
-rw-r--r--test/modules/image.spec.ts53
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();