@times-components/ts-components 1.106.1 → 1.107.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/package.json +3 -3
- package/dist/components/latest-from-section/LatestFromSection.d.ts +0 -8
- package/dist/components/latest-from-section/LatestFromSection.js +0 -14
- package/dist/components/latest-from-section/LatestFromSection.stories.d.ts +0 -1
- package/dist/components/latest-from-section/LatestFromSection.stories.js +0 -11
- package/dist/components/latest-from-section/__tests__/LatestFromSection.test.d.ts +0 -1
- package/dist/components/latest-from-section/__tests__/LatestFromSection.test.js +0 -23
- package/dist/components/latest-from-section/__tests__/formatters.test.d.ts +0 -1
- package/dist/components/latest-from-section/__tests__/formatters.test.js +0 -11
- package/dist/components/latest-from-section/fixtures/fixtures.d.ts +0 -2
- package/dist/components/latest-from-section/fixtures/fixtures.js +0 -1064
- package/dist/components/latest-from-section/formatters.d.ts +0 -24
- package/dist/components/latest-from-section/formatters.js +0 -78
- package/src/components/latest-from-section/LatestFromSection.stories.tsx +0 -31
- package/src/components/latest-from-section/LatestFromSection.tsx +0 -36
- package/src/components/latest-from-section/__tests__/LatestFromSection.test.tsx +0 -33
- package/src/components/latest-from-section/__tests__/__snapshots__/LatestFromSection.test.tsx.snap +0 -322
- package/src/components/latest-from-section/__tests__/__snapshots__/formatters.test.ts.snap +0 -213
- package/src/components/latest-from-section/__tests__/formatters.test.ts +0 -11
- package/src/components/latest-from-section/fixtures/fixtures.ts +0 -1286
- package/src/components/latest-from-section/formatters.ts +0 -107
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`latest from section formatters formats 1`] = `
|
|
4
|
-
Array [
|
|
5
|
-
Object {
|
|
6
|
-
"bylines": Array [
|
|
7
|
-
Object {
|
|
8
|
-
"byline": Array [
|
|
9
|
-
Object {
|
|
10
|
-
"attributes": Object {
|
|
11
|
-
"slug": "didi-tang",
|
|
12
|
-
},
|
|
13
|
-
"children": Array [
|
|
14
|
-
Object {
|
|
15
|
-
"attributes": Object {
|
|
16
|
-
"value": "David Walsh",
|
|
17
|
-
},
|
|
18
|
-
"children": Array [],
|
|
19
|
-
"name": "text",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
"name": "author",
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
"image": null,
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
"headline": "The entire Tour bows to the greatness of Cavendish",
|
|
29
|
-
"id": "c286c868-d90a-11eb-8f14-0bb645f59db0",
|
|
30
|
-
"label": "cycling | David Walsh",
|
|
31
|
-
"leadAsset": Object {
|
|
32
|
-
"crop169": Object {
|
|
33
|
-
"url": "https://www.thetimes.co.uk/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2Fb7fca746-d8ec-11eb-8f14-0bb645f59db0.jpg",
|
|
34
|
-
},
|
|
35
|
-
"crop32": Object {
|
|
36
|
-
"url": "https://www.thetimes.co.uk/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2Fb7fca746-d8ec-11eb-8f14-0bb645f59db0.jpg",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
"publishedTime": "2021-06-29T23:01:00Z",
|
|
40
|
-
"section": "Sport",
|
|
41
|
-
"shortIdentifier": "2zq0zgfmn",
|
|
42
|
-
"slug": "the-entire-tour-de-france-bows-to-the-greatness-of-mark-cavendish",
|
|
43
|
-
"summary125": Array [
|
|
44
|
-
Object {
|
|
45
|
-
"children": Array [
|
|
46
|
-
Object {
|
|
47
|
-
"attributes": Object {
|
|
48
|
-
"value": "The story of Mark Cavendish’s heroic return can be told in many ways. In the brilliance of the sprint, mostly. His team-mates had done an outstanding job but ri",
|
|
49
|
-
},
|
|
50
|
-
"children": Array [],
|
|
51
|
-
"name": "text",
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
"name": "paragraph",
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
"summary145": Array [
|
|
58
|
-
Object {
|
|
59
|
-
"children": Array [
|
|
60
|
-
Object {
|
|
61
|
-
"attributes": Object {
|
|
62
|
-
"value": "The story of Mark Cavendish’s heroic return can be told in many ways. In the brilliance of the sprint, mostly. His team-mates had done an outstanding job but ri",
|
|
63
|
-
},
|
|
64
|
-
"children": Array [],
|
|
65
|
-
"name": "text",
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
"name": "paragraph",
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
"updatedTime": "2021-06-29T22:33:53Z",
|
|
72
|
-
"url": "/article/the-entire-tour-de-france-bows-to-the-greatness-of-mark-cavendish-2zq0zgfmn",
|
|
73
|
-
},
|
|
74
|
-
Object {
|
|
75
|
-
"bylines": Array [
|
|
76
|
-
Object {
|
|
77
|
-
"byline": Array [
|
|
78
|
-
Object {
|
|
79
|
-
"attributes": Object {
|
|
80
|
-
"slug": "didi-tang",
|
|
81
|
-
},
|
|
82
|
-
"children": Array [
|
|
83
|
-
Object {
|
|
84
|
-
"attributes": Object {
|
|
85
|
-
"value": "Matt Lawton",
|
|
86
|
-
},
|
|
87
|
-
"children": Array [],
|
|
88
|
-
"name": "text",
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
"name": "author",
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
"image": null,
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
"headline": "Flawless Pickford repels everything Germans muster",
|
|
98
|
-
"id": "01ee453e-d90c-11eb-8f14-0bb645f59db0",
|
|
99
|
-
"label": "Euro 2020 | Matt Lawton",
|
|
100
|
-
"leadAsset": Object {
|
|
101
|
-
"crop169": Object {
|
|
102
|
-
"url": "https://www.thetimes.co.uk/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2F65e48858-d913-11eb-b92f-5fe539a30c29.jpg",
|
|
103
|
-
},
|
|
104
|
-
"crop32": Object {
|
|
105
|
-
"url": "https://www.thetimes.co.uk/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2F65e48858-d913-11eb-b92f-5fe539a30c29.jpg",
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
"publishedTime": "2021-06-30T11:00:00Z",
|
|
109
|
-
"section": "Sport",
|
|
110
|
-
"shortIdentifier": "ktkcvc85p",
|
|
111
|
-
"slug": "jordan-pickford-repels-everything-germans-muster",
|
|
112
|
-
"summary125": Array [
|
|
113
|
-
Object {
|
|
114
|
-
"children": Array [
|
|
115
|
-
Object {
|
|
116
|
-
"attributes": Object {
|
|
117
|
-
"value": "Accompanied by a ghost of England’s past in the form of Thomas Müller, Germany set out to inflict yet more misery on their hosts with two spirited young forward",
|
|
118
|
-
},
|
|
119
|
-
"children": Array [],
|
|
120
|
-
"name": "text",
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
"name": "paragraph",
|
|
124
|
-
},
|
|
125
|
-
],
|
|
126
|
-
"summary145": Array [
|
|
127
|
-
Object {
|
|
128
|
-
"children": Array [
|
|
129
|
-
Object {
|
|
130
|
-
"attributes": Object {
|
|
131
|
-
"value": "Accompanied by a ghost of England’s past in the form of Thomas Müller, Germany set out to inflict yet more misery on their hosts with two spirited young forward",
|
|
132
|
-
},
|
|
133
|
-
"children": Array [],
|
|
134
|
-
"name": "text",
|
|
135
|
-
},
|
|
136
|
-
],
|
|
137
|
-
"name": "paragraph",
|
|
138
|
-
},
|
|
139
|
-
],
|
|
140
|
-
"updatedTime": "2021-06-30T10:43:13Z",
|
|
141
|
-
"url": "/article/jordan-pickford-repels-everything-germans-muster-ktkcvc85p",
|
|
142
|
-
},
|
|
143
|
-
Object {
|
|
144
|
-
"bylines": Array [
|
|
145
|
-
Object {
|
|
146
|
-
"byline": Array [
|
|
147
|
-
Object {
|
|
148
|
-
"attributes": Object {
|
|
149
|
-
"slug": "didi-tang",
|
|
150
|
-
},
|
|
151
|
-
"children": Array [
|
|
152
|
-
Object {
|
|
153
|
-
"attributes": Object {
|
|
154
|
-
"value": "Jonathan Northcroft",
|
|
155
|
-
},
|
|
156
|
-
"children": Array [],
|
|
157
|
-
"name": "text",
|
|
158
|
-
},
|
|
159
|
-
],
|
|
160
|
-
"name": "author",
|
|
161
|
-
},
|
|
162
|
-
],
|
|
163
|
-
"image": null,
|
|
164
|
-
},
|
|
165
|
-
],
|
|
166
|
-
"headline": "The tactical masterstrokes behind England’s ruthless win",
|
|
167
|
-
"id": "a8bfaa82-d917-11eb-b92f-5fe539a30c29",
|
|
168
|
-
"label": "Euro 2020 | Jonathan Northcroft",
|
|
169
|
-
"leadAsset": Object {
|
|
170
|
-
"crop169": Object {
|
|
171
|
-
"url": "https://www.thetimes.co.uk/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2F798e1dce-d918-11eb-b92f-5fe539a30c29.jpg",
|
|
172
|
-
},
|
|
173
|
-
"crop32": Object {
|
|
174
|
-
"url": "https://www.thetimes.co.uk/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2F65f0ffc0-d918-11eb-b92f-5fe539a30c29.jpg",
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
"publishedTime": "2021-06-29T23:01:00Z",
|
|
178
|
-
"section": "Sport",
|
|
179
|
-
"shortIdentifier": "s2s5j6k8l",
|
|
180
|
-
"slug": "the-tactical-masterstrokes-behind-englands-ruthless-win",
|
|
181
|
-
"summary125": Array [
|
|
182
|
-
Object {
|
|
183
|
-
"children": Array [
|
|
184
|
-
Object {
|
|
185
|
-
"attributes": Object {
|
|
186
|
-
"value": "Rising value of SterlingRaheem Sterling is often portrayed as the kid from an estate near Wembley, who transitioned from street player to a star on its pitch. A",
|
|
187
|
-
},
|
|
188
|
-
"children": Array [],
|
|
189
|
-
"name": "text",
|
|
190
|
-
},
|
|
191
|
-
],
|
|
192
|
-
"name": "paragraph",
|
|
193
|
-
},
|
|
194
|
-
],
|
|
195
|
-
"summary145": Array [
|
|
196
|
-
Object {
|
|
197
|
-
"children": Array [
|
|
198
|
-
Object {
|
|
199
|
-
"attributes": Object {
|
|
200
|
-
"value": "Rising value of SterlingRaheem Sterling is often portrayed as the kid from an estate near Wembley, who transitioned from street player to a star on its pitch. A",
|
|
201
|
-
},
|
|
202
|
-
"children": Array [],
|
|
203
|
-
"name": "text",
|
|
204
|
-
},
|
|
205
|
-
],
|
|
206
|
-
"name": "paragraph",
|
|
207
|
-
},
|
|
208
|
-
],
|
|
209
|
-
"updatedTime": "2021-06-30T11:42:55Z",
|
|
210
|
-
"url": "/article/the-tactical-masterstrokes-behind-englands-ruthless-win-s2s5j6k8l",
|
|
211
|
-
},
|
|
212
|
-
]
|
|
213
|
-
`;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { formatLatestFromSection, getSectionTitle } from '../formatters';
|
|
2
|
-
import { latestFromSection } from '../fixtures/fixtures';
|
|
3
|
-
describe('latest from section formatters', () => {
|
|
4
|
-
it('formats', () => {
|
|
5
|
-
expect(formatLatestFromSection(latestFromSection[4])).toMatchSnapshot();
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
it('getSectionTitle', () => {
|
|
9
|
-
expect(getSectionTitle(latestFromSection[4])).toEqual('Sport');
|
|
10
|
-
});
|
|
11
|
-
});
|