mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-25 23:48:54 +00:00
committed by
Nicolas Gallagher
parent
33dc3cb018
commit
29146fe5bc
+7
-1
@@ -24,7 +24,13 @@ exports[`createOrderedCSSStyleSheet #insert insertion order for different groups
|
||||
.four-2 {}
|
||||
[stylesheet-group=\\"9.9\\"]{}
|
||||
.nine-1 {}
|
||||
.nine-2 {}"
|
||||
.nine-2 {}
|
||||
[stylesheet-group=\\"10\\"]{}
|
||||
.ten {}
|
||||
[stylesheet-group=\\"20\\"]{}
|
||||
.twenty {}
|
||||
[stylesheet-group=\\"20.2\\"]{}
|
||||
.twenty-point2 {}"
|
||||
`;
|
||||
|
||||
exports[`createOrderedCSSStyleSheet #insert insertion order for same group 1`] = `""`;
|
||||
|
||||
Vendored
+3
@@ -54,6 +54,9 @@ describe('createOrderedCSSStyleSheet', () => {
|
||||
sheet.insert('.two {}', 2.2);
|
||||
sheet.insert('.four-1 {}', 4);
|
||||
sheet.insert('.four-2 {}', 4);
|
||||
sheet.insert('.twenty {}', 20);
|
||||
sheet.insert('.ten {}', 10);
|
||||
sheet.insert('.twenty-point2 {}', 20.2);
|
||||
|
||||
expect(sheet.getTextContent()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
+2
-2
@@ -148,8 +148,8 @@ function decodeGroupRule(cssRule) {
|
||||
|
||||
function getOrderedGroups(obj: { [key: number]: any }) {
|
||||
return Object.keys(obj)
|
||||
.sort()
|
||||
.map(k => Number(k));
|
||||
.map(Number)
|
||||
.sort((a, b) => (a > b ? 1 : -1));
|
||||
}
|
||||
|
||||
const pattern = /\s*([,])\s*/g;
|
||||
|
||||
Reference in New Issue
Block a user