File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 5050 "webpack-cli" : " ^3.1.2"
5151 },
5252 "dependencies" : {
53- "cloudinary-core" : " ^2.6.2 " ,
53+ "cloudinary-core" : " ^2.7.4 " ,
5454 "prop-types" : " ^15.6.2"
5555 },
5656 "peerDependencies" : {
Original file line number Diff line number Diff line change @@ -98,4 +98,30 @@ describe('Image', () => {
9898 expect ( tag . state ( "url" ) ) . to . equal ( `http://res.cloudinary.com/demo/image/upload/c_scale,w_${ Math . ceil ( containerWidth / 100 ) * 100 } /sample` ) ;
9999 } ) ;
100100 } ) ;
101- } ) ;
101+ it ( 'should support custom function remote' , ( ) => {
102+ const customFunction = {
103+ function_type : "remote" ,
104+ source : "https://df34ra4a.execute-api.us-west-2.amazonaws.com/default/cloudinaryFunction"
105+ } ;
106+
107+ let tag = mount (
108+ < Image publicId = "sample" cloudName = "demo" > < Transformation customFunction = { customFunction } /> </ Image >
109+ ) ;
110+
111+ expect ( tag . find ( 'img' ) . prop ( 'src' ) ) . to . match (
112+ / f n _ r e m o t e : a H R 0 c H M 6 L y 9 k Z j M 0 c m E 0 Y S 5 l e G V j d X R l L W F w a S 5 1 c y 1 3 Z X N 0 L T I u Y W 1 h e m 9 u Y X d z L m N v b S 9 k Z W Z h d W x 0 L 2 N s b 3 V k a W 5 h c n l G d W 5 j d G l v b g = = \/ s a m p l e /
113+ ) ;
114+ } ) ;
115+ it ( 'should support custom function wasm' , ( ) => {
116+ const customFunction = {
117+ function_type : "wasm" ,
118+ source : "blur.wasm"
119+ } ;
120+
121+ let tag = mount (
122+ < Image publicId = "sample" cloudName = "demo" > < Transformation customFunction = { customFunction } /> </ Image >
123+ ) ;
124+
125+ expect ( tag . find ( 'img' ) . prop ( 'src' ) ) . to . match ( / f n _ w a s m : b l u r .w a s m \/ s a m p l e / ) ;
126+ } ) ;
127+ } ) ;
You can’t perform that action at this time.
0 commit comments