@@ -19,6 +19,11 @@ describe('helper functions related to topics', () => {
19
19
expect ( displayTopic ) . to . equal ( 'N/A' ) ;
20
20
} ) ;
21
21
22
+ it ( 'returns "N/A" if topic is Coronavirus' , ( ) => {
23
+ const displayTopic = getDisplayTopic ( 'Coronavirus' ) ;
24
+ expect ( displayTopic ) . to . equal ( 'N/A' ) ;
25
+ } ) ;
26
+
22
27
it ( 'returns "N/A" if topic is not part of shared data topic list' , ( ) => {
23
28
const displayTopic = getDisplayTopic ( 'BEST_BOOKS' ) ;
24
29
expect ( displayTopic ) . to . equal ( 'N/A' ) ;
@@ -43,7 +48,7 @@ describe('helper functions related to topics', () => {
43
48
expect ( topics ) . to . be . an ( 'array' ) ;
44
49
// However, we're getting the entire list of topics here,
45
50
// not just the ones stories belong to
46
- expect ( topics ) . to . have . lengthOf ( 17 ) ;
51
+ expect ( topics ) . to . have . lengthOf ( 16 ) ;
47
52
48
53
// And we expect to see the story topics, with the correct counts
49
54
expect ( topics ) . to . contain . deep . members ( [
@@ -87,14 +92,9 @@ describe('helper functions related to topics', () => {
87
92
expect ( topics ) . to . be . an ( 'array' ) . with . lengthOf ( 5 ) ;
88
93
} ) ;
89
94
90
- it ( 'returns a list of topics without "Coronavirus" if requested' , ( ) => {
91
- const topics = getGroupedTopicData ( data , true , false ) ;
92
- expect ( topics ) . to . be . an ( 'array' ) . with . lengthOf ( 16 ) ;
93
- } ) ;
94
-
95
95
it ( 'returns a full list of topics if requested' , ( ) => {
96
96
const topics = getGroupedTopicData ( data ) ;
97
- expect ( topics ) . to . be . an ( 'array' ) . with . lengthOf ( 17 ) ;
97
+ expect ( topics ) . to . be . an ( 'array' ) . with . lengthOf ( 16 ) ;
98
98
} ) ;
99
99
} ) ;
100
100
} ) ;
0 commit comments