Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Commit 8e17745

Browse files
committed
Continue working on types
kinda better? kinda more better? no more red fix tests
1 parent a8103b5 commit 8e17745

File tree

2 files changed

+101
-87
lines changed

2 files changed

+101
-87
lines changed

packages/react/src/seo.test.ts

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ describe('generateSeoTags', () => {
66
// Given
77
const input = {
88
title: undefined,
9+
titleTemplate: undefined,
10+
alternates: undefined,
911
description: undefined,
1012
url: undefined,
1113
handle: undefined,
12-
ldJson: undefined,
14+
jsonLd: undefined,
1315
media: undefined,
1416
};
1517

@@ -796,11 +798,11 @@ describe('generateSeoTags', () => {
796798
});
797799
});
798800

799-
describe('ldJson', () => {
801+
describe('jsonLd', () => {
800802
it('should infer default values from the URL', () => {
801803
// Given
802804
const input = {
803-
ldJson: {},
805+
jsonLd: {},
804806
url: 'https://hydrogen.shopify.com/products/1234',
805807
};
806808

@@ -854,10 +856,10 @@ describe('generateSeoTags', () => {
854856
`);
855857
});
856858

857-
it('should add additional ldJson values', () => {
859+
it('should add additional jsonLd values', () => {
858860
// Given
859861
const input = {
860-
ldJson: {
862+
jsonLd: {
861863
'@type': 'Product',
862864
aggregateRating: {
863865
'@type': 'AggregateRating',
@@ -929,10 +931,6 @@ describe('generateSeoTags', () => {
929931
url: 'https://hydrogen.shop.com/de/products/1234',
930932
language: 'de',
931933
},
932-
{
933-
url: 'https://m.hydrogen.shop.com/es/products/1234',
934-
media: 'only screen and (max-width: 640px)',
935-
},
936934
],
937935
};
938936

@@ -946,7 +944,7 @@ describe('generateSeoTags', () => {
946944
"key": "link-alternate-de",
947945
"props": {
948946
"href": "https://hydrogen.shop.com/de/products/1234",
949-
"hreflang": "de",
947+
"hrefLang": "de",
950948
"rel": "alternate",
951949
},
952950
"tag": "link",
@@ -955,16 +953,7 @@ describe('generateSeoTags', () => {
955953
"key": "link-alternate-fr-default",
956954
"props": {
957955
"href": "https://hydrogen.shop.com/fr/products/1234",
958-
"hreflang": "fr-default",
959-
"rel": "alternate",
960-
},
961-
"tag": "link",
962-
},
963-
{
964-
"key": "link-alternate-only-screen-and-(max-width:-640px)",
965-
"props": {
966-
"href": "https://m.hydrogen.shop.com/es/products/1234",
967-
"media": "only screen and (max-width: 640px)",
956+
"hrefLang": "fr-default",
968957
"rel": "alternate",
969958
},
970959
"tag": "link",

0 commit comments

Comments
 (0)