Skip to content

Commit

Permalink
Simplify isURL tests
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks committed Aug 20, 2018
1 parent 136aa7b commit 0d218ad
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/url/src/test/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { forEach } from 'lodash';
import { every } from 'lodash';

/**
* Internal dependencies
Expand All @@ -18,9 +18,7 @@ describe( 'isURL', () => {
'https://localhost/foo#bar',
];

forEach( urls, ( url ) => {
expect( isURL( url ) ).toBe( true );
} );
expect( every( urls, isURL ) ).toBe( true );
} );

it( 'returns false when given things that don\'t look like a URL', () => {
Expand All @@ -32,9 +30,7 @@ describe( 'isURL', () => {
'',
];

forEach( urls, ( url ) => {
expect( isURL( url ) ).toBe( false );
} );
expect( every( urls, isURL ) ).toBe( false );
} );
} );

Expand Down

0 comments on commit 0d218ad

Please sign in to comment.