File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,41 @@ const tests = {
154154 message : 'Expected class names to be in ascending order. \'a\' should be before \'b\'.' ,
155155 } ] ,
156156 } ,
157+ {
158+ code : `
159+ const styles = StyleSheet.create({
160+ 'b': {},
161+ 'a': {},
162+ })
163+ ` ,
164+ errors : [ {
165+ message : 'Expected class names to be in ascending order. \'a\' should be before \'b\'.' ,
166+ } ] ,
167+ } ,
168+ {
169+ code : `
170+ const styles = StyleSheet.create({
171+ ['b']: {},
172+ [\`a\`]: {},
173+ })
174+ ` ,
175+ errors : [ {
176+ message : 'Expected class names to be in ascending order. \'a\' should be before \'b\'.' ,
177+ } ] ,
178+ } ,
179+ {
180+ code : `
181+ const a = 'a';
182+ const b = 'b';
183+ const styles = StyleSheet.create({
184+ [\`\${a}-\${b}-b\`]: {},
185+ [\`a-\${b}-a\`]: {},
186+ })
187+ ` ,
188+ errors : [ {
189+ message : 'Expected class names to be in ascending order. \'a-b-a\' should be before \'a-b-b\'.' ,
190+ } ] ,
191+ } ,
157192 ] ,
158193} ;
159194
You can’t perform that action at this time.
0 commit comments