@@ -23,7 +23,7 @@ test('avatar default', () => {
2323} ) ;
2424
2525test ( 'avatar dynamic-animated' , ( ) => {
26- expect ( cdn . avatar ( id , animatedHash ) ) . toEqual ( `${ baseCDN } /avatars/${ id } /${ animatedHash } .gif ` ) ;
26+ expect ( cdn . avatar ( id , animatedHash ) ) . toEqual ( `${ baseCDN } /avatars/${ id } /${ animatedHash } .webp?animated=true ` ) ;
2727} ) ;
2828
2929test ( 'avatar dynamic-not-animated' , ( ) => {
@@ -50,28 +50,16 @@ test('discoverySplash default', () => {
5050 expect ( cdn . discoverySplash ( id , hash ) ) . toEqual ( `${ baseCDN } /discovery-splashes/${ id } /${ hash } .webp` ) ;
5151} ) ;
5252
53- test ( 'emoji static' , ( ) => {
54- expect ( cdn . emoji ( id , false ) ) . toEqual ( `${ baseCDN } /emojis/${ id } .webp` ) ;
55- } ) ;
56-
57- test ( 'emoji static with JPG extension' , ( ) => {
58- expect ( cdn . emoji ( id , false , { extension : 'jpg' } ) ) . toEqual ( `${ baseCDN } /emojis/${ id } .jpg` ) ;
59- } ) ;
60-
61- test ( 'emoji static with JPG extension with force static' , ( ) => {
62- expect ( cdn . emoji ( id , false , { extension : 'jpg' , forceStatic : true } ) ) . toEqual ( `${ baseCDN } /emojis/${ id } .jpg` ) ;
53+ test ( 'emoji' , ( ) => {
54+ expect ( cdn . emoji ( id ) ) . toEqual ( `${ baseCDN } /emojis/${ id } .webp` ) ;
6355} ) ;
6456
6557test ( 'emoji animated' , ( ) => {
66- expect ( cdn . emoji ( id , true ) ) . toEqual ( `${ baseCDN } /emojis/${ id } .gif ` ) ;
58+ expect ( cdn . emoji ( id , { animated : true } ) ) . toEqual ( `${ baseCDN } /emojis/${ id } .webp?animated=true ` ) ;
6759} ) ;
6860
69- test ( 'emoji animated with JPG extension' , ( ) => {
70- expect ( cdn . emoji ( id , true , { extension : 'jpg' } ) ) . toEqual ( `${ baseCDN } /emojis/${ id } .gif` ) ;
71- } ) ;
72-
73- test ( 'emoji animated with JPG extension with force static' , ( ) => {
74- expect ( cdn . emoji ( id , true , { extension : 'jpg' , forceStatic : true } ) ) . toEqual ( `${ baseCDN } /emojis/${ id } .jpg` ) ;
61+ test ( 'emoji with GIF format' , ( ) => {
62+ expect ( cdn . emoji ( id , { extension : 'gif' } ) ) . toEqual ( `${ baseCDN } /emojis/${ id } .gif` ) ;
7563} ) ;
7664
7765test ( 'guildMemberAvatar default' , ( ) => {
@@ -80,7 +68,7 @@ test('guildMemberAvatar default', () => {
8068
8169test ( 'guildMemberAvatar dynamic-animated' , ( ) => {
8270 expect ( cdn . guildMemberAvatar ( id , id , animatedHash ) ) . toEqual (
83- `${ baseCDN } /guilds/${ id } /users/${ id } /avatars/${ animatedHash } .gif ` ,
71+ `${ baseCDN } /guilds/${ id } /users/${ id } /avatars/${ animatedHash } .webp?animated=true ` ,
8472 ) ;
8573} ) ;
8674
@@ -94,7 +82,7 @@ test('guildMemberBanner default', () => {
9482
9583test ( 'guildMemberBanner dynamic-animated' , ( ) => {
9684 expect ( cdn . guildMemberBanner ( id , id , animatedHash ) ) . toEqual (
97- `${ baseCDN } /guilds/${ id } /users/${ id } /banners/${ animatedHash } .gif ` ,
85+ `${ baseCDN } /guilds/${ id } /users/${ id } /banners/${ animatedHash } .webp?animated=true ` ,
9886 ) ;
9987} ) ;
10088
@@ -111,7 +99,7 @@ test('icon default', () => {
11199} ) ;
112100
113101test ( 'icon dynamic-animated' , ( ) => {
114- expect ( cdn . icon ( id , animatedHash ) ) . toEqual ( `${ baseCDN } /icons/${ id } /${ animatedHash } .gif ` ) ;
102+ expect ( cdn . icon ( id , animatedHash ) ) . toEqual ( `${ baseCDN } /icons/${ id } /${ animatedHash } .webp?animated=true ` ) ;
115103} ) ;
116104
117105test ( 'icon dynamic-not-animated' , ( ) => {
@@ -157,5 +145,7 @@ test('makeURL throws on invalid extension', () => {
157145} ) ;
158146
159147test ( 'makeURL valid size' , ( ) => {
160- expect ( cdn . avatar ( id , animatedHash , { size : 512 } ) ) . toEqual ( `${ baseCDN } /avatars/${ id } /${ animatedHash } .gif?size=512` ) ;
148+ expect ( cdn . avatar ( id , animatedHash , { size : 512 } ) ) . toEqual (
149+ `${ baseCDN } /avatars/${ id } /${ animatedHash } .webp?animated=true&size=512` ,
150+ ) ;
161151} ) ;
0 commit comments