File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,48 @@ const tests = {
324324 } ,
325325 ] ,
326326 } ,
327+ {
328+ code : `
329+ const styles = StyleSheet.create({
330+ a: {
331+ d: 4,
332+ // comments
333+ c: 3,
334+ a: 1,
335+ b: 2,
336+ },
337+ d: {},
338+ c: {},
339+ // comments
340+ b: {
341+ a: 1,
342+ b: 2,
343+ },
344+ })
345+ ` ,
346+ output : `
347+ const styles = StyleSheet.create({
348+ a: {
349+ a: 1,
350+ b: 2,
351+ // comments
352+ c: 3,
353+ d: 4,
354+ },
355+ // comments
356+ b: {
357+ a: 1,
358+ b: 2,
359+ },
360+ c: {},
361+ d: {},
362+ })
363+ ` ,
364+ errors : [
365+ { message : "Expected style properties to be in ascending order. 'c' should be before 'd'." } ,
366+ { message : "Expected class names to be in ascending order. 'c' should be before 'd'." } ,
367+ ] ,
368+ } ,
327369 ] ,
328370} ;
329371
You can’t perform that action at this time.
0 commit comments