Add tests to close issues (#8276)

* add tests for #6899

* add tests for #6326

* add tests for #8154
This commit is contained in:
Georgii Dolzhykov authored and GitHub committed 2020-05-11 11:49:04 +03:00
1 parent c521d20c85
commit 746fee6fef
6 files changed
+140

No files matched your search

@@ -257,6 +257,56 @@ printWidth: 80
================================================================================
`;
exports[`color-level-4.css format 1`] = `
====================================options=====================================
parsers: ["css"]
printWidth: 80
| printWidth
=====================================input======================================
/* https://www.w3.org/TR/css-color-4 */
foo {
color: rgb(0, 128, 255);
color: rgba(0, 128, 255, 0.5);
color: hsl(198, 28%, 50%);
color: hsla(198, 28%, 50%, 0.5);
color: lab(56.29% 019.93 16.58 / 50%);
color: lch(56.29% 19.86 236.62 / 50%);
/* color(sRGB 0 0.50 1 / 50%); */
}
bar {
color: rgb(0 128 255);
color: rgb(0 128 255 / 50%);
color: hsl(198deg 28% 50%);
color: hsl(198deg 28% 50% / 50%);
color: lab(56.29% 019.93 16.58 / 50%);
color: lch(56.29% 19.86 236.62deg / 50%);
}
=====================================output=====================================
/* https://www.w3.org/TR/css-color-4 */
foo {
color: rgb(0, 128, 255);
color: rgba(0, 128, 255, 0.5);
color: hsl(198, 28%, 50%);
color: hsla(198, 28%, 50%, 0.5);
color: lab(56.29% 019.93 16.58 / 50%);
color: lch(56.29% 19.86 236.62 / 50%);
/* color(sRGB 0 0.50 1 / 50%); */
}
bar {
color: rgb(0 128 255);
color: rgb(0 128 255 / 50%);
color: hsl(198deg 28% 50%);
color: hsl(198deg 28% 50% / 50%);
color: lab(56.29% 019.93 16.58 / 50%);
color: lch(56.29% 19.86 236.62deg / 50%);
}
================================================================================
`;
exports[`current-color.css format 1`] = `
====================================options=====================================
parsers: ["css"]
+19
View File
@@ -0,0 +1,19 @@
/* https://www.w3.org/TR/css-color-4 */
foo {
color: rgb(0, 128, 255);
color: rgba(0, 128, 255, 0.5);
color: hsl(198, 28%, 50%);
color: hsla(198, 28%, 50%, 0.5);
color: lab(56.29% 019.93 16.58 / 50%);
color: lch(56.29% 19.86 236.62 / 50%);
/* color(sRGB 0 0.50 1 / 50%); */
}
bar {
color: rgb(0 128 255);
color: rgb(0 128 255 / 50%);
color: hsl(198deg 28% 50%);
color: hsl(198deg 28% 50% / 50%);
color: lab(56.29% 019.93 16.58 / 50%);
color: lch(56.29% 19.86 236.62deg / 50%);
}
@@ -69,6 +69,35 @@ var X = {
================================================================================
`;
exports[`function-default-type-parameters.js - {"trailingComma":"all"} format 1`] = `
====================================options=====================================
parsers: ["flow", "babel"]
printWidth: 80
trailingComma: "all"
| printWidth
=====================================input======================================
function foo<T: any = number>(): any {}
=====================================output=====================================
function foo<T: any = number>(): any {}
================================================================================
`;
exports[`function-default-type-parameters.js format 1`] = `
====================================options=====================================
parsers: ["flow", "babel"]
printWidth: 80
| printWidth
=====================================input======================================
function foo<T: any = number>(): any {}
=====================================output=====================================
function foo<T: any = number>(): any {}
================================================================================
`;
exports[`generic.js - {"trailingComma":"all"} format 1`] = `
====================================options=====================================
parsers: ["flow", "babel"]
@@ -0,0 +1 @@
function foo<T: any = number>(): any {}
@@ -130,6 +130,38 @@ export const getVehicleDescriptor = async (
================================================================================
`;
exports[`issue-6899.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
| printWidth
=====================================input======================================
const getUnusedAuthorizationHoldDocuments = async (): Promise<DocumentData[]> => {}
const firestorePersonallyIdentifiablePaths: Array<
keyof Collections.Users.Entity
> = []
export const SUPPORTED_VEHICLE_TYPES: Array<
Collections.VehiclesStates.Entity['type']
> = Object.values(Collections.VehiclesStates.Type);
=====================================output=====================================
const getUnusedAuthorizationHoldDocuments = async (): Promise<
DocumentData[]
> => {};
const firestorePersonallyIdentifiablePaths: Array<
keyof Collections.Users.Entity
> = [];
export const SUPPORTED_VEHICLE_TYPES: Array<
Collections.VehiclesStates.Entity["type"]
> = Object.values(Collections.VehiclesStates.Type);
================================================================================
`;
exports[`object-method.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
+9
View File
@@ -0,0 +1,9 @@
const getUnusedAuthorizationHoldDocuments = async (): Promise<DocumentData[]> => {}
const firestorePersonallyIdentifiablePaths: Array<
keyof Collections.Users.Entity
> = []
export const SUPPORTED_VEHICLE_TYPES: Array<
Collections.VehiclesStates.Entity['type']
> = Object.values(Collections.VehiclesStates.Type);