File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
dotcom-rendering/src/model Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { Standard } from '../../fixtures/generated/fe-articles/Standard';
1111import { hostedArticle } from '../../fixtures/manual/hostedArticle' ;
1212import { hostedGallery } from '../../fixtures/manual/hostedGallery' ;
1313import { hostedVideo } from '../../fixtures/manual/hostedVideo' ;
14- import { validateAsFEArticle , validateAsHostedContent } from './validate' ;
14+ import { validateAsFEArticle , validateAsFEHostedContent } from './validate' ;
1515
1616const articles = [
1717 {
@@ -59,6 +59,7 @@ describe('validate', () => {
5959 it ( 'throws on invalid data' , ( ) => {
6060 const data = { foo : 'bar' } ;
6161 expect ( ( ) => validateAsFEArticle ( data ) ) . toThrow ( TypeError ) ;
62+ expect ( ( ) => validateAsFEHostedContent ( data ) ) . toThrow ( TypeError ) ;
6263 } ) ;
6364
6465 for ( const article of articles ) {
@@ -69,7 +70,7 @@ describe('validate', () => {
6970
7071 for ( const hostedItem of hostedContent ) {
7172 it ( `validates data for hosted ${ hostedItem . name } content` , ( ) => {
72- expect ( validateAsHostedContent ( hostedItem . data ) ) . toBe (
73+ expect ( validateAsFEHostedContent ( hostedItem . data ) ) . toBe (
7374 hostedItem . data ,
7475 ) ;
7576 } ) ;
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ export const validateAsFootballMatchPageType = (
190190 ) ;
191191} ;
192192
193- export const validateAsHostedContent = ( data : unknown ) : FEHostedContent => {
193+ export const validateAsFEHostedContent = ( data : unknown ) : FEHostedContent => {
194194 if ( validateHostedContent ( data ) ) return data ;
195195
196196 const url =
You can’t perform that action at this time.
0 commit comments