@@ -35,8 +35,8 @@ describe("Base functions", () => {
3535 assert . strictEqual ( user . favoriteFruit , object . favoriteFruit , "favoriteFruit is not equal" ) ;
3636
3737 user . friends . forEach ( ( friend : IFriend , index : number ) => {
38- assert . strictEqual ( friend . id , object . friends [ index ] . id , `friend ${ index } id is not equal` ) ;
39- assert . strictEqual ( friend . name , object . friends [ index ] . name , `friend ${ index } name is not equal` ) ;
38+ assert . strictEqual ( friend . id , object . friends [ index ] . id , `friend ${ String ( index ) } id is not equal` ) ;
39+ assert . strictEqual ( friend . name , object . friends [ index ] . name , `friend ${ String ( index ) } name is not equal` ) ;
4040 } ) ;
4141 } ) ;
4242
@@ -69,8 +69,8 @@ describe("Base functions", () => {
6969 assert . strictEqual ( user . favoriteFruit , object . favoriteFruit , "favoriteFruit is not equal" ) ;
7070
7171 user . friends . forEach ( ( friend : IFriend , index : number ) => {
72- assert . strictEqual ( friend . id , object . friends [ index ] . id , `friend ${ index } id is not equal` ) ;
73- assert . strictEqual ( friend . name , object . friends [ index ] . name , `friend ${ index } name is not equal` ) ;
72+ assert . strictEqual ( friend . id , object . friends [ index ] . id , `friend ${ String ( index ) } id is not equal` ) ;
73+ assert . strictEqual ( friend . name , object . friends [ index ] . name , `friend ${ String ( index ) } name is not equal` ) ;
7474 } ) ;
7575 } ) ;
7676
@@ -103,8 +103,8 @@ describe("Base functions", () => {
103103 assert . strictEqual ( user . favoriteFruit , object . favoriteFruit , "favoriteFruit is not equal" ) ;
104104
105105 user . friends . forEach ( ( friend : IFriend , index : number ) => {
106- assert . strictEqual ( friend . id , object . friends [ index ] . id , `friend ${ index } id is not equal` ) ;
107- assert . strictEqual ( friend . name , object . friends [ index ] . name , `friend ${ index } name is not equal` ) ;
106+ assert . strictEqual ( friend . id , object . friends [ index ] . id , `friend ${ String ( index ) } id is not equal` ) ;
107+ assert . strictEqual ( friend . name , object . friends [ index ] . name , `friend ${ String ( index ) } name is not equal` ) ;
108108 } ) ;
109109 } ) ;
110110
@@ -137,8 +137,8 @@ describe("Base functions", () => {
137137 assert . strictEqual ( user . favoriteFruit , object . favoriteFruit , "favoriteFruit is not equal" ) ;
138138
139139 user . friends . forEach ( ( friend : IFriend , index : number ) => {
140- assert . strictEqual ( friend . id , object . friends [ index ] . id , `friend ${ index } id is not equal` ) ;
141- assert . strictEqual ( friend . name , object . friends [ index ] . name , `friend ${ index } name is not equal` ) ;
140+ assert . strictEqual ( friend . id , object . friends [ index ] . id , `friend ${ String ( index ) } id is not equal` ) ;
141+ assert . strictEqual ( friend . name , object . friends [ index ] . name , `friend ${ String ( index ) } name is not equal` ) ;
142142 } ) ;
143143 } ) ;
144144} ) ;
0 commit comments