Skip to content

Commit

Permalink
fix(formats): added missing EOL before EOF for some formats (#963)
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustinasVainius authored Apr 18, 2023
1 parent 2aae037 commit dd60479
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 45 deletions.
9 changes: 6 additions & 3 deletions __integration__/__snapshots__/customFileHeader.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ module.exports = {
]
}
}
};"
};
"
`;

exports[`integration valid custom file headers platform options no file options should match snapshot 1`] = `
Expand Down Expand Up @@ -88,7 +89,8 @@ module.exports = {
]
}
}
};"
};
"
`;

exports[`integration valid custom file headers platform options showFileHeader should match snapshot 1`] = `
Expand All @@ -110,5 +112,6 @@ exports[`integration valid custom file headers platform options showFileHeader s
]
}
}
};"
};
"
`;
9 changes: 6 additions & 3 deletions __integration__/__snapshots__/flutter.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ class StyleDictionaryColor {
static const fontSuccess = Color(0xFF08422F);
static const fontTertiary = Color(0xFF364141);
static const fontWarning = Color(0xFF601700);
}"
}
"
`;

exports[`integration flutter flutter/class.dart should match snapshot 1`] = `
Expand Down Expand Up @@ -350,7 +351,8 @@ class StyleDictionary {
static const sizePaddingMedium = 16.00;
static const sizePaddingSmall = 8.00;
static const sizePaddingXl = 16.00;
}"
}
"
`;

exports[`integration flutter flutter/class.dart with references should match snapshot 1`] = `
Expand Down Expand Up @@ -531,5 +533,6 @@ class StyleDictionary {
static const colorFontInteractiveHover = colorBrandPrimary;
static const colorFontInteractive = colorBrandPrimary;
static const colorBackgroundDisabled = colorBackgroundTertiary;
}"
}
"
`;
6 changes: 4 additions & 2 deletions __integration__/__snapshots__/objectValues.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,15 @@ exports[`integration object values scss/variables should match snapshot 1`] = `
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
$border-primary: 0.125rem solid #ff0000;"
$border-primary: 0.125rem solid #ff0000;
"
`;

exports[`integration object values scss/variables with references should match snapshot 1`] = `
"
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
$border-primary: $size-border solid $color-red;"
$border-primary: $size-border solid $color-red;
"
`;
12 changes: 8 additions & 4 deletions __integration__/__snapshots__/scss.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,8 @@ $size-font-xl: 2.25rem;
$size-padding-small: 0.5rem;
$size-padding-medium: 1rem;
$size-padding-large: 1rem;
$size-padding-xl: 1rem;"
$size-padding-xl: 1rem;
"
`;

exports[`integration scss scss/variables with filter and output references should match snapshot 1`] = `
Expand All @@ -1522,7 +1523,8 @@ $color-background-danger: $color-core-red-0;
$color-background-tertiary: $color-core-neutral-200;
$color-background-secondary: $color-core-neutral-100;
$color-background-primary: $color-core-neutral-0 !default;
$color-background-disabled: $color-background-tertiary;"
$color-background-disabled: $color-background-tertiary;
"
`;

exports[`integration scss scss/variables with outputReferences should match snapshot 1`] = `
Expand Down Expand Up @@ -1691,7 +1693,8 @@ $color-font-interactive-disabled: $color-font-tertiary;
$color-font-interactive-active: $color-brand-secondary;
$color-font-interactive-hover: $color-brand-primary;
$color-font-interactive: $color-brand-primary;
$color-background-disabled: $color-background-tertiary;"
$color-background-disabled: $color-background-tertiary;
"
`;

exports[`integration scss scss/variables with themeable should match snapshot 1`] = `
Expand Down Expand Up @@ -1860,5 +1863,6 @@ $size-font-xl: 2.25rem !default;
$size-padding-small: 0.5rem !default;
$size-padding-medium: 1rem !default;
$size-padding-large: 1rem !default;
$size-padding-xl: 1rem !default;"
$size-padding-xl: 1rem !default;
"
`;
45 changes: 30 additions & 15 deletions __tests__/formats/__snapshots__/all.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ class {
._();
static const color_red = #FF0000; /* comment */
}"
}
"
`;
exports[`formats all should match ios/colors.h snapshot 1`] = `
Expand Down Expand Up @@ -466,7 +467,8 @@ exports[`formats all should match javascript/es6 snapshot 1`] = `
* Generated on Sat, 01 Jan 2000 00:00:00 GMT
*/
export const color_red = \\"#FF0000\\"; // comment"
export const color_red = \\"#FF0000\\"; // comment
"
`;
exports[`formats all should match javascript/module snapshot 1`] = `
Expand Down Expand Up @@ -494,7 +496,8 @@ module.exports = {
]
}
}
};"
};
"
`;
exports[`formats all should match javascript/module-flat snapshot 1`] = `
Expand All @@ -505,7 +508,8 @@ exports[`formats all should match javascript/module-flat snapshot 1`] = `
module.exports = {
\\"color_red\\": \\"#FF0000\\"
};"
};
"
`;
exports[`formats all should match javascript/object snapshot 1`] = `
Expand Down Expand Up @@ -533,7 +537,8 @@ var _styleDictionary = {
]
}
}
};"
};
"
`;
exports[`formats all should match javascript/umd snapshot 1`] = `
Expand Down Expand Up @@ -597,23 +602,26 @@ exports[`formats all should match json snapshot 1`] = `
]
}
}
}"
}
"
`;
exports[`formats all should match json/asset snapshot 1`] = `"{}"`;
exports[`formats all should match json/flat snapshot 1`] = `
"{
\\"color_red\\": \\"#FF0000\\"
}"
}
"
`;
exports[`formats all should match json/nested snapshot 1`] = `
"{
\\"color\\": {
\\"red\\": \\"#FF0000\\"
}
}"
}
"
`;
exports[`formats all should match less/icons snapshot 1`] = `
Expand All @@ -629,7 +637,8 @@ exports[`formats all should match less/variables snapshot 1`] = `
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
@color_red: #FF0000; // comment"
@color_red: #FF0000; // comment
"
`;
exports[`formats all should match sass/map-deep snapshot 1`] = `
Expand Down Expand Up @@ -707,15 +716,17 @@ exports[`formats all should match scss/variables snapshot 1`] = `
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
$color_red: #FF0000; // comment"
$color_red: #FF0000; // comment
"
`;
exports[`formats all should match sketch/palette snapshot 1`] = `
"{
\\"compatibleVersion\\": \\"1.0\\",
\\"pluginVersion\\": \\"1.1\\",
\\"colors\\": []
}"
}
"
`;
exports[`formats all should match sketch/palette/v2 snapshot 1`] = `
Expand All @@ -734,15 +745,17 @@ exports[`formats all should match sketch/palette/v2 snapshot 1`] = `
\\"name\\": \\"color_red\\"
}
]
}"
}
"
`;
exports[`formats all should match stylus/variables snapshot 1`] = `
"
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
$color_red= #FF0000; // comment"
$color_red= #FF0000; // comment
"
`;
exports[`formats all should match typescript/es6-declarations snapshot 1`] = `
Expand All @@ -752,7 +765,8 @@ exports[`formats all should match typescript/es6-declarations snapshot 1`] = `
*/
/** comment */
export const color_red : string;"
export const color_red : string;
"
`;
exports[`formats all should match typescript/module-declarations snapshot 1`] = `
Expand Down Expand Up @@ -783,5 +797,6 @@ declare const tokens: {
\\"color\\": {
\\"red\\": DesignToken
}
}"
}
"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ exports[`formats typescript/es6-declarations with outputStringLiterals should ma
*/
/** Used for errors */
export const colorRed : \\"#FF0000\\";"
export const colorRed : \\"#FF0000\\";
"
`;
Loading

0 comments on commit dd60479

Please sign in to comment.