@@ -151,12 +151,67 @@ ruleTester.run("no-duplicate-keys", rule, {
151151 } ,
152152 ] ,
153153 } ,
154+ {
155+ code : '{"foot": 1, "fo\\u006ft": 2}' ,
156+ errors : [
157+ {
158+ messageId : "duplicateKey" ,
159+ data : { key : "fo\\u006ft" } ,
160+ line : 1 ,
161+ column : 13 ,
162+ endLine : 1 ,
163+ endColumn : 24 ,
164+ } ,
165+ ] ,
166+ } ,
167+ {
168+ code : '{"foot": 1, "fo\\u006ft": 2}' ,
169+ language : "json/jsonc" ,
170+ errors : [
171+ {
172+ messageId : "duplicateKey" ,
173+ data : { key : "fo\\u006ft" } ,
174+ line : 1 ,
175+ column : 13 ,
176+ endLine : 1 ,
177+ endColumn : 24 ,
178+ } ,
179+ ] ,
180+ } ,
181+ {
182+ code : '{"foot": 1, "fo\\u006ft": 2}' ,
183+ language : "json/json5" ,
184+ errors : [
185+ {
186+ messageId : "duplicateKey" ,
187+ data : { key : "fo\\u006ft" } ,
188+ line : 1 ,
189+ column : 13 ,
190+ endLine : 1 ,
191+ endColumn : 24 ,
192+ } ,
193+ ] ,
194+ } ,
195+ {
196+ code : "{foot: 1, fo\\u006ft: 2}" ,
197+ language : "json/json5" ,
198+ errors : [
199+ {
200+ messageId : "duplicateKey" ,
201+ data : { key : "fo\\u006ft" } ,
202+ line : 1 ,
203+ column : 11 ,
204+ endLine : 1 ,
205+ endColumn : 20 ,
206+ } ,
207+ ] ,
208+ } ,
154209 {
155210 code : '{"f\\u006fot": 1, "fo\\u006ft": 2}' ,
156211 errors : [
157212 {
158213 messageId : "duplicateKey" ,
159- data : { key : "foot " } ,
214+ data : { key : "fo\\u006ft " } ,
160215 line : 1 ,
161216 column : 18 ,
162217 endLine : 1 ,
@@ -170,7 +225,7 @@ ruleTester.run("no-duplicate-keys", rule, {
170225 errors : [
171226 {
172227 messageId : "duplicateKey" ,
173- data : { key : "foot " } ,
228+ data : { key : "fo\\u006ft " } ,
174229 line : 1 ,
175230 column : 18 ,
176231 endLine : 1 ,
@@ -184,7 +239,7 @@ ruleTester.run("no-duplicate-keys", rule, {
184239 errors : [
185240 {
186241 messageId : "duplicateKey" ,
187- data : { key : "foot " } ,
242+ data : { key : "fo\\u006ft " } ,
188243 line : 1 ,
189244 column : 18 ,
190245 endLine : 1 ,
@@ -198,7 +253,7 @@ ruleTester.run("no-duplicate-keys", rule, {
198253 errors : [
199254 {
200255 messageId : "duplicateKey" ,
201- data : { key : "foot " } ,
256+ data : { key : "fo\\u006ft " } ,
202257 line : 1 ,
203258 column : 16 ,
204259 endLine : 1 ,
0 commit comments