diff --git a/packages/url/src/test/index.js b/packages/url/src/test/index.js index 950746f0aa9e5..bd48105baed96 100644 --- a/packages/url/src/test/index.js +++ b/packages/url/src/test/index.js @@ -992,6 +992,12 @@ describe( 'safeDecodeURI', () => { } ); describe( 'filterURLForDisplay', () => { + it( 'should return an empty string if the url is empty or falsy', () => { + let url = filterURLForDisplay( '' ); + expect( url ).toBe( '' ); + url = filterURLForDisplay( null ); + expect( url ).toBe( '' ); + } ); it( 'should remove protocol', () => { let url = filterURLForDisplay( 'http://wordpress.org' ); expect( url ).toBe( 'wordpress.org' );