Skip to content

Commit fc174d7

Browse files
committed
fix naming issue
1 parent 7a8d0d4 commit fc174d7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dotcom-rendering/src/model/validate.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Standard } from '../../fixtures/generated/fe-articles/Standard';
1111
import { hostedArticle } from '../../fixtures/manual/hostedArticle';
1212
import { hostedGallery } from '../../fixtures/manual/hostedGallery';
1313
import { hostedVideo } from '../../fixtures/manual/hostedVideo';
14-
import { validateAsFEArticle, validateAsHostedContent } from './validate';
14+
import { validateAsFEArticle, validateAsFEHostedContent } from './validate';
1515

1616
const 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
});

dotcom-rendering/src/model/validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 =

0 commit comments

Comments
 (0)