This repository was archived by the owner on Apr 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -298,8 +298,6 @@ describe('CacheableImage', function() {
298
298
299
299
it ( '#_loadImage should warn developer on error getting local file path.' , ( ) => {
300
300
301
- // Verify source uri prop only accepts web accessible urls.
302
-
303
301
const CacheableImage = imageCacheHoc ( Image ) ;
304
302
305
303
const imageUrl = 'https://img.wennermedia.com/5333a62d-07db-432a-92e2-198cafa38a14-326adb1a-d8ed-4a5d-b37e-5c88883e1989.png' ;
@@ -330,6 +328,24 @@ describe('CacheableImage', function() {
330
328
331
329
} ) ;
332
330
331
+ it ( 'componentWillReceiveProps should not throw any uncaught errors.' , ( ) => {
332
+
333
+ const CacheableImage = imageCacheHoc ( Image ) ;
334
+
335
+ const cacheableImage = new CacheableImage ( { // eslint-disable-line no-unused-vars
336
+ source : {
337
+ uri : 'https://img.wennermedia.com/5333a62d-07db-432a-92e2-198cafa38a14-326adb1a-d8ed-4a5d-b37e-5c88883e1989.png'
338
+ }
339
+ } ) ;
340
+
341
+ cacheableImage . componentWillReceiveProps ( { // eslint-disable-line no-unused-vars
342
+ source : {
343
+ uri : 'https://img.wennermedia.com/wallpaper1-39bd413b-cb85-4af0-9f33-3507f272e562.jpg'
344
+ }
345
+ } ) ;
346
+
347
+ } ) ;
348
+
333
349
it ( '#render with valid props does not throw an error.' , ( ) => {
334
350
335
351
const CacheableImage = imageCacheHoc ( Image ) ;
You can’t perform that action at this time.
0 commit comments