test: improve snapshots (#5521)
- before ``` ${input}${"~".repeat(printWidth)} ${output} ``` - after ``` ===options=== ${options} ${" ".repeat(printWidth)}| printWidth ====input==== ${input} ===output==== ${output} ============= ```master
parent
66ada24961
commit
4af3dd4b07
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`test.component.ts - typescript-verify 1`] = `
|
||||
exports[`test.component.ts 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@Component({
|
||||
selector: 'app-test',
|
||||
template: \`<ul> <li>test</li>
|
||||
|
@ -18,7 +23,8 @@ exports[`test.component.ts - typescript-verify 1`] = `
|
|||
]
|
||||
})
|
||||
class TestComponent {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@Component({
|
||||
selector: "app-test",
|
||||
template: \`
|
||||
|
@ -39,9 +45,16 @@ class TestComponent {}
|
|||
})
|
||||
class TestComponent {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`test.component.ts - typescript-verify 2`] = `
|
||||
exports[`test.component.ts 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
trailingComma: "es5"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@Component({
|
||||
selector: 'app-test',
|
||||
template: \`<ul> <li>test</li>
|
||||
|
@ -59,7 +72,8 @@ exports[`test.component.ts - typescript-verify 2`] = `
|
|||
]
|
||||
})
|
||||
class TestComponent {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@Component({
|
||||
selector: "app-test",
|
||||
template: \`
|
||||
|
@ -80,4 +94,5 @@ class TestComponent {}
|
|||
})
|
||||
class TestComponent {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,19 +1,31 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`logical-expression.ng - __ng_interpolation-verify 1`] = `
|
||||
exports[`logical-expression.ng 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["__ng_interpolation"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
[
|
||||
advancedSearchService.patientInformationFieldsRow2 && advancedSearchService.patientInformationFieldsRow2.indexOf(advancedSearchService.formElementData.customFieldList[i].customFieldType) !== -1
|
||||
]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
[
|
||||
advancedSearchService.patientInformationFieldsRow2 &&
|
||||
advancedSearchService.patientInformationFieldsRow2.indexOf(
|
||||
advancedSearchService.formElementData.customFieldList[i].customFieldType
|
||||
) !== -1
|
||||
]
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`pipe-expression.ng - __ng_interpolation-verify 1`] = `
|
||||
exports[`pipe-expression.ng 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["__ng_interpolation"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
[
|
||||
a ? (b | c : d) : (e | f : g),
|
||||
a | b | c | d,
|
||||
|
@ -39,7 +51,8 @@ exports[`pipe-expression.ng - __ng_interpolation-verify 1`] = `
|
|||
| aaa,
|
||||
(hideLinqPanel ? "ReportSelection.HideShowLabel_Show.String" : "ReportSelection.HideShowLabel_Hide.String") | localize:(localizationSection)
|
||||
]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
[
|
||||
a ? (b | c: d) : (e | f: g),
|
||||
a | b | c | d,
|
||||
|
@ -70,4 +83,5 @@ exports[`pipe-expression.ng - __ng_interpolation-verify 1`] = `
|
|||
: "ReportSelection.HideShowLabel_Hide.String")
|
||||
| localize: localizationSection
|
||||
]
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`multiple.js - flow-verify 1`] = `
|
||||
exports[`multiple.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
[...a, ...b,];
|
||||
[...a, ...b];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
[...a, ...b];
|
||||
[...a, ...b];
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,30 +1,49 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`empty.js - flow-verify 1`] = `
|
||||
exports[`empty.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const a = someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || [];
|
||||
const a = someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || {};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const a =
|
||||
someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || [];
|
||||
const a =
|
||||
someVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeLong.Expression || {};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`last.js - flow-verify 1`] = `
|
||||
exports[`last.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
[,];
|
||||
[,,];
|
||||
[,,1,];
|
||||
[,,1,1];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
[,];
|
||||
[, ,];
|
||||
[, , 1];
|
||||
[, , 1, 1];
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`preserve_empty_lines.js - flow-verify 1`] = `
|
||||
exports[`preserve_empty_lines.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a = [
|
||||
|
||||
1,
|
||||
|
@ -37,7 +56,9 @@ a = [
|
|||
|
||||
|
||||
]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a = [1, 2, 3, 4];
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`arrow_call.js - babylon-verify 1`] = `
|
||||
exports[`arrow_call.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const testResults = results.testResults.map(testResult =>
|
||||
formatResult(testResult, formatter, reporter)
|
||||
);
|
||||
|
@ -45,7 +50,8 @@ const composition = (ViewComponent, ContainerComponent) =>
|
|||
};
|
||||
|
||||
promise.then(result => result.veryLongVariable.veryLongPropertyName > someOtherVariable ? "ok" : "fail");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const testResults = results.testResults.map(testResult =>
|
||||
formatResult(testResult, formatter, reporter)
|
||||
);
|
||||
|
@ -101,9 +107,16 @@ promise.then(result =>
|
|||
: "fail"
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`arrow_call.js - babylon-verify 2`] = `
|
||||
exports[`arrow_call.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "flow", "typescript"]
|
||||
printWidth: 80
|
||||
trailingComma: "all"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const testResults = results.testResults.map(testResult =>
|
||||
formatResult(testResult, formatter, reporter)
|
||||
);
|
||||
|
@ -148,7 +161,8 @@ const composition = (ViewComponent, ContainerComponent) =>
|
|||
};
|
||||
|
||||
promise.then(result => result.veryLongVariable.veryLongPropertyName > someOtherVariable ? "ok" : "fail");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const testResults = results.testResults.map(testResult =>
|
||||
formatResult(testResult, formatter, reporter),
|
||||
);
|
||||
|
@ -204,9 +218,16 @@ promise.then(result =>
|
|||
: "fail",
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`arrow_call.js - babylon-verify 3`] = `
|
||||
exports[`arrow_call.js 3`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "always"
|
||||
parsers: ["babylon", "flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const testResults = results.testResults.map(testResult =>
|
||||
formatResult(testResult, formatter, reporter)
|
||||
);
|
||||
|
@ -251,7 +272,8 @@ const composition = (ViewComponent, ContainerComponent) =>
|
|||
};
|
||||
|
||||
promise.then(result => result.veryLongVariable.veryLongPropertyName > someOtherVariable ? "ok" : "fail");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const testResults = results.testResults.map((testResult) =>
|
||||
formatResult(testResult, formatter, reporter)
|
||||
);
|
||||
|
@ -307,4 +329,5 @@ promise.then((result) =>
|
|||
: "fail"
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`arrow_function_expression.js - babylon-verify 1`] = `
|
||||
exports[`arrow_function_expression.js 1`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "avoid"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
(a => {}).length
|
||||
typeof (() => {});
|
||||
export default (() => {})();
|
||||
|
@ -36,7 +42,8 @@ a = b => c;
|
|||
a = b => {
|
||||
return c
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
(a => {}).length;
|
||||
typeof (() => {});
|
||||
export default (() => {})();
|
||||
|
@ -74,9 +81,16 @@ a = b => {
|
|||
return c;
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`arrow_function_expression.js - babylon-verify 2`] = `
|
||||
exports[`arrow_function_expression.js 2`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "always"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
(a => {}).length
|
||||
typeof (() => {});
|
||||
export default (() => {})();
|
||||
|
@ -112,7 +126,8 @@ a = b => c;
|
|||
a = b => {
|
||||
return c
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
((a) => {}).length;
|
||||
typeof (() => {});
|
||||
export default (() => {})();
|
||||
|
@ -150,23 +165,46 @@ a = (b) => {
|
|||
return c;
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`block_like.js - babylon-verify 1`] = `
|
||||
a = () => ({} = this);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`block_like.js 1`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "avoid"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a = () => ({} = this);
|
||||
|
||||
=====================================output=====================================
|
||||
a = () => ({} = this);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`block_like.js - babylon-verify 2`] = `
|
||||
a = () => ({} = this);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`block_like.js 2`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "always"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a = () => ({} = this);
|
||||
|
||||
=====================================output=====================================
|
||||
a = () => ({} = this);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`call.js - babylon-verify 1`] = `
|
||||
exports[`call.js 1`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "avoid"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
Seq(typeDef.interface.groups).forEach(group =>
|
||||
Seq(group.members).forEach((member, memberName) =>
|
||||
markdownDoc(
|
||||
|
@ -247,7 +285,8 @@ jest.mock(
|
|||
fooooooooooooooooooooooooooooooooooooooooooooooooooo(action => next =>
|
||||
dispatch(action),
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
Seq(typeDef.interface.groups).forEach(group =>
|
||||
Seq(group.members).forEach((member, memberName) =>
|
||||
markdownDoc(member.doc, {
|
||||
|
@ -337,9 +376,16 @@ fooooooooooooooooooooooooooooooooooooooooooooooooooo(action => next =>
|
|||
dispatch(action)
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`call.js - babylon-verify 2`] = `
|
||||
exports[`call.js 2`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "always"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
Seq(typeDef.interface.groups).forEach(group =>
|
||||
Seq(group.members).forEach((member, memberName) =>
|
||||
markdownDoc(
|
||||
|
@ -420,7 +466,8 @@ jest.mock(
|
|||
fooooooooooooooooooooooooooooooooooooooooooooooooooo(action => next =>
|
||||
dispatch(action),
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
Seq(typeDef.interface.groups).forEach((group) =>
|
||||
Seq(group.members).forEach((member, memberName) =>
|
||||
markdownDoc(member.doc, {
|
||||
|
@ -510,9 +557,16 @@ fooooooooooooooooooooooooooooooooooooooooooooooooooo((action) => (next) =>
|
|||
dispatch(action)
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`comment.js - babylon-verify 1`] = `
|
||||
exports[`comment.js 1`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "avoid"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/**
|
||||
* Curried function that ends with a BEM CSS Selector
|
||||
*
|
||||
|
@ -543,7 +597,8 @@ export const bem = block =>
|
|||
) => <span>{info.item.widget.missingProp}</span>}
|
||||
data={data}
|
||||
/>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/**
|
||||
* Curried function that ends with a BEM CSS Selector
|
||||
*
|
||||
|
@ -575,9 +630,16 @@ export const bem = block =>
|
|||
data={data}
|
||||
/>;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`comment.js - babylon-verify 2`] = `
|
||||
exports[`comment.js 2`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "always"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/**
|
||||
* Curried function that ends with a BEM CSS Selector
|
||||
*
|
||||
|
@ -608,7 +670,8 @@ export const bem = block =>
|
|||
) => <span>{info.item.widget.missingProp}</span>}
|
||||
data={data}
|
||||
/>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/**
|
||||
* Curried function that ends with a BEM CSS Selector
|
||||
*
|
||||
|
@ -640,9 +703,16 @@ export const bem = (block) =>
|
|||
data={data}
|
||||
/>;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`currying.js - babylon-verify 1`] = `
|
||||
exports[`currying.js 1`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "avoid"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const fn = b => c => d => {
|
||||
return 3;
|
||||
};
|
||||
|
@ -660,7 +730,8 @@ const mw = store => next => action => {
|
|||
const middleware = options => (req, res, next) => {
|
||||
// ...
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const fn = b => c => d => {
|
||||
return 3;
|
||||
};
|
||||
|
@ -679,9 +750,16 @@ const middleware = options => (req, res, next) => {
|
|||
// ...
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`currying.js - babylon-verify 2`] = `
|
||||
exports[`currying.js 2`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "always"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const fn = b => c => d => {
|
||||
return 3;
|
||||
};
|
||||
|
@ -699,7 +777,8 @@ const mw = store => next => action => {
|
|||
const middleware = options => (req, res, next) => {
|
||||
// ...
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const fn = (b) => (c) => (d) => {
|
||||
return 3;
|
||||
};
|
||||
|
@ -718,33 +797,57 @@ const middleware = (options) => (req, res, next) => {
|
|||
// ...
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`long-call-no-args.js - babylon-verify 1`] = `
|
||||
exports[`long-call-no-args.js 1`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "avoid"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
veryLongCall(VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, () => {})
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
veryLongCall(
|
||||
VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT,
|
||||
() => {}
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`long-call-no-args.js - babylon-verify 2`] = `
|
||||
exports[`long-call-no-args.js 2`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "always"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
veryLongCall(VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT, () => {})
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
veryLongCall(
|
||||
VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT,
|
||||
() => {}
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`long-contents.js - babylon-verify 1`] = `
|
||||
exports[`long-contents.js 1`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "avoid"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const foo = () => {
|
||||
expect(arg1, arg2, arg3).toEqual({message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'});
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const foo = () => {
|
||||
expect(arg1, arg2, arg3).toEqual({
|
||||
message: "test",
|
||||
|
@ -754,13 +857,21 @@ const foo = () => {
|
|||
});
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`long-contents.js - babylon-verify 2`] = `
|
||||
exports[`long-contents.js 2`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "always"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const foo = () => {
|
||||
expect(arg1, arg2, arg3).toEqual({message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'});
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const foo = () => {
|
||||
expect(arg1, arg2, arg3).toEqual({
|
||||
message: "test",
|
||||
|
@ -770,9 +881,16 @@ const foo = () => {
|
|||
});
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`parens.js - babylon-verify 1`] = `
|
||||
exports[`parens.js 1`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "avoid"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
promise.then(
|
||||
(result) => result,
|
||||
(err) => err
|
||||
|
@ -788,7 +906,8 @@ foo(a => { return b })
|
|||
foo(c, a => b)
|
||||
foo(c, a => b, d)
|
||||
foo(a => b, d)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
promise.then(result => result, err => err);
|
||||
|
||||
promise.then(
|
||||
|
@ -810,9 +929,16 @@ foo(c, a => b);
|
|||
foo(c, a => b, d);
|
||||
foo(a => b, d);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`parens.js - babylon-verify 2`] = `
|
||||
exports[`parens.js 2`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "always"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
promise.then(
|
||||
(result) => result,
|
||||
(err) => err
|
||||
|
@ -828,7 +954,8 @@ foo(a => { return b })
|
|||
foo(c, a => b)
|
||||
foo(c, a => b, d)
|
||||
foo(a => b, d)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
promise.then((result) => result, (err) => err);
|
||||
|
||||
promise.then(
|
||||
|
@ -850,16 +977,24 @@ foo(c, (a) => b);
|
|||
foo(c, (a) => b, d);
|
||||
foo((a) => b, d);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`short_body.js - babylon-verify 1`] = `
|
||||
exports[`short_body.js 1`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "avoid"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const initializeSnapshotState = (
|
||||
testFile: Path,
|
||||
update: boolean,
|
||||
testPath: string,
|
||||
expand: boolean,
|
||||
) => new SnapshotState(testFile, update, testPath, expand);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const initializeSnapshotState = (
|
||||
testFile: Path,
|
||||
update: boolean,
|
||||
|
@ -867,16 +1002,24 @@ const initializeSnapshotState = (
|
|||
expand: boolean
|
||||
) => new SnapshotState(testFile, update, testPath, expand);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`short_body.js - babylon-verify 2`] = `
|
||||
exports[`short_body.js 2`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "always"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const initializeSnapshotState = (
|
||||
testFile: Path,
|
||||
update: boolean,
|
||||
testPath: string,
|
||||
expand: boolean,
|
||||
) => new SnapshotState(testFile, update, testPath, expand);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const initializeSnapshotState = (
|
||||
testFile: Path,
|
||||
update: boolean,
|
||||
|
@ -884,18 +1027,35 @@ const initializeSnapshotState = (
|
|||
expand: boolean
|
||||
) => new SnapshotState(testFile, update, testPath, expand);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`type_params.js - babylon-verify 1`] = `
|
||||
exports[`type_params.js 1`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "avoid"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
<T>(a) => { }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
<T>(a) => {};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`type_params.js - babylon-verify 2`] = `
|
||||
exports[`type_params.js 2`] = `
|
||||
====================================options=====================================
|
||||
arrowParens: "always"
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
<T>(a) => { }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
<T>(a) => {};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`arrows-bind.js - babylon-verify 1`] = `
|
||||
exports[`arrows-bind.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a => ({}::b()\`\`[''].c++ && 0 ? 0 : 0);
|
||||
(a => b)::c;
|
||||
a::(b => c);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a => ({}::b()\`\`[""].c++ && 0 ? 0 : 0);
|
||||
(a => b)::c;
|
||||
a::(b => c);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`binaryish.js - flow-verify 1`] = `
|
||||
exports[`binaryish.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const computedDescriptionLines = (showConfirm &&
|
||||
descriptionLinesConfirming) ||
|
||||
(focused && !loading && descriptionLinesFocused) ||
|
||||
|
@ -10,7 +15,8 @@ computedDescriptionLines = (focused &&
|
|||
!loading &&
|
||||
descriptionLinesFocused) ||
|
||||
descriptionLines;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const computedDescriptionLines =
|
||||
(showConfirm && descriptionLinesConfirming) ||
|
||||
(focused && !loading && descriptionLinesFocused) ||
|
||||
|
@ -19,9 +25,15 @@ const computedDescriptionLines =
|
|||
computedDescriptionLines =
|
||||
(focused && !loading && descriptionLinesFocused) || descriptionLines;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`destructuring.js - flow-verify 1`] = `
|
||||
exports[`destructuring.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
let {
|
||||
bottom: offsetBottom,
|
||||
left: offsetLeft,
|
||||
|
@ -33,7 +45,8 @@ const { accessibilityModule: FooAccessibilityModule, accessibilityModule: FooAcc
|
|||
} = foo || {};
|
||||
|
||||
({ prop: toAssign = "default" } = { prop: "propval" });
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
let {
|
||||
bottom: offsetBottom,
|
||||
left: offsetLeft,
|
||||
|
@ -50,9 +63,15 @@ const {
|
|||
|
||||
({ prop: toAssign = "default" } = { prop: "propval" });
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`sequence.js - flow-verify 1`] = `
|
||||
exports[`sequence.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
for ((i = 0), (len = arr.length); i < len; i++) {
|
||||
console.log(arr[i])
|
||||
}
|
||||
|
@ -60,7 +79,8 @@ for ((i = 0), (len = arr.length); i < len; i++) {
|
|||
for (i = 0, len = arr.length; i < len; i++) {
|
||||
console.log(arr[i])
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
for (i = 0, len = arr.length; i < len; i++) {
|
||||
console.log(arr[i]);
|
||||
}
|
||||
|
@ -69,4 +89,5 @@ for (i = 0, len = arr.length; i < len; i++) {
|
|||
console.log(arr[i]);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`assignment_comments.js - flow-verify 1`] = `
|
||||
exports[`assignment_comments.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
fnString =
|
||||
// Comment
|
||||
'some' + 'long' + 'string';
|
||||
|
@ -55,7 +60,8 @@ let f = (
|
|||
a =
|
||||
b //comment
|
||||
) => {};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
fnString =
|
||||
// Comment
|
||||
"some" + "long" + "string";
|
||||
|
@ -117,4 +123,5 @@ let f = (
|
|||
a = b //comment
|
||||
) => {};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`assignment_expression.js - flow-verify 1`] = `
|
||||
this.size = this._origin = this._capacity = 0;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`assignment_expression.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
this.size = this._origin = this._capacity = 0;
|
||||
|
||||
=====================================output=====================================
|
||||
this.size = this._origin = this._capacity = 0;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`logical-assignment.js - babylon-verify 1`] = `
|
||||
a ||= b;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`logical-assignment.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a ||= b;
|
||||
|
||||
=====================================output=====================================
|
||||
a ||= b;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`async-iteration.js - flow-verify 1`] = `
|
||||
exports[`async-iteration.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
async function * a() {
|
||||
yield* b();
|
||||
|
@ -11,7 +16,8 @@ class X {
|
|||
yield* a();
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
async function* a() {
|
||||
yield* b();
|
||||
}
|
||||
|
@ -22,9 +28,15 @@ class X {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`await_parse.js - flow-verify 1`] = `
|
||||
exports[`await_parse.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
async function f() { (await f()).length }
|
||||
async function g() {
|
||||
invariant(
|
||||
|
@ -41,7 +53,8 @@ async () => {
|
|||
new A(await x);
|
||||
obj[await x];
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
async function f() {
|
||||
(await f()).length;
|
||||
}
|
||||
|
@ -59,9 +72,15 @@ async () => {
|
|||
obj[await x];
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`conditional-expression.js - flow-verify 1`] = `
|
||||
exports[`conditional-expression.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
async function f() {
|
||||
const result = typeof fn === 'function' ? await fn() : null;
|
||||
}
|
||||
|
@ -76,7 +95,8 @@ async function f() {
|
|||
await (spellcheck && spellcheck.setChecking(false));
|
||||
await spellcheck && spellcheck.setChecking(false)
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
async function f() {
|
||||
const result = typeof fn === "function" ? await fn() : null;
|
||||
}
|
||||
|
@ -90,13 +110,20 @@ async function f() {
|
|||
(await spellcheck) && spellcheck.setChecking(false);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`parens.js - flow-verify 1`] = `
|
||||
exports[`parens.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
async function *f(){ await (yield x); }
|
||||
|
||||
async function f(){ await (() => {}); }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
async function* f() {
|
||||
await (yield x);
|
||||
}
|
||||
|
@ -105,4 +132,5 @@ async function f() {
|
|||
await (() => {});
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`example.js - babylon-verify 1`] = `
|
||||
await something();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`example.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
await something();
|
||||
|
||||
=====================================output=====================================
|
||||
await something();
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`literal.js - babylon-verify 1`] = `
|
||||
exports[`literal.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
100n
|
||||
9223372036854775807n
|
||||
0o16432n
|
||||
|
@ -9,7 +14,8 @@ exports[`literal.js - babylon-verify 1`] = `
|
|||
0XFFF123n
|
||||
0b101011101n
|
||||
0B101011101n
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
100n;
|
||||
9223372036854775807n;
|
||||
0o16432n;
|
||||
|
@ -19,4 +25,5 @@ exports[`literal.js - babylon-verify 1`] = `
|
|||
0b101011101n;
|
||||
0b101011101n;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`arrow.js - flow-verify 1`] = `
|
||||
exports[`arrow.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function f() {
|
||||
const appEntitys = getAppEntitys(loadObject).filter(
|
||||
entity => entity && entity.isInstallAvailable() && !entity.isQueue() && entity.isDisabled()
|
||||
|
@ -14,7 +19,8 @@ function f() {
|
|||
}
|
||||
)
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function f() {
|
||||
const appEntitys = getAppEntitys(loadObject).filter(
|
||||
entity =>
|
||||
|
@ -37,39 +43,59 @@ function f() {
|
|||
);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`bitwise-flags.js - flow-verify 1`] = `
|
||||
const FLAG_A = 1 << 0;
|
||||
const FLAG_B = 1 << 1;
|
||||
const FLAG_C = 1 << 2;
|
||||
|
||||
const all = FLAG_A | FLAG_B | FLAG_C;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`bitwise-flags.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const FLAG_A = 1 << 0;
|
||||
const FLAG_B = 1 << 1;
|
||||
const FLAG_C = 1 << 2;
|
||||
|
||||
const all = FLAG_A | FLAG_B | FLAG_C;
|
||||
|
||||
=====================================output=====================================
|
||||
const FLAG_A = 1 << 0;
|
||||
const FLAG_B = 1 << 1;
|
||||
const FLAG_C = 1 << 2;
|
||||
|
||||
const all = FLAG_A | FLAG_B | FLAG_C;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`comment.js - flow-verify 1`] = `
|
||||
exports[`comment.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a = (
|
||||
// Commment 1
|
||||
(Math.random() * (yRange * (1 - minVerticalFraction)))
|
||||
+ (minVerticalFraction * yRange)
|
||||
) - offset;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a =
|
||||
// Commment 1
|
||||
Math.random() * (yRange * (1 - minVerticalFraction)) +
|
||||
minVerticalFraction * yRange -
|
||||
offset;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`equality.js - flow-verify 1`] = `
|
||||
exports[`equality.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
x == y == z;
|
||||
x != y == z;
|
||||
x == y != z;
|
||||
|
@ -79,7 +105,8 @@ x === y === z;
|
|||
x !== y === z;
|
||||
x === y !== z;
|
||||
x !== y !== z;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
(x == y) == z;
|
||||
(x != y) == z;
|
||||
(x == y) != z;
|
||||
|
@ -90,9 +117,15 @@ x !== y !== z;
|
|||
(x === y) !== z;
|
||||
(x !== y) !== z;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`exp.js - flow-verify 1`] = `
|
||||
exports[`exp.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a ** b ** c;
|
||||
(a ** b) ** c;
|
||||
a.b ** c;
|
||||
|
@ -102,7 +135,8 @@ a ** -b;
|
|||
(a * b) ** c;
|
||||
a ** (b * c);
|
||||
(a % b) ** c;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a ** (b ** c);
|
||||
(a ** b) ** c;
|
||||
a.b ** c;
|
||||
|
@ -113,9 +147,15 @@ a ** -b;
|
|||
a ** (b * c);
|
||||
(a % b) ** c;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`if.js - flow-verify 1`] = `
|
||||
exports[`if.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
if (this.hasPlugin("dynamicImports") && this.lookahead().type) {}
|
||||
|
||||
if (this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft) {}
|
||||
|
@ -124,7 +164,8 @@ if (this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.r
|
|||
|
||||
if (VeryVeryVeryVeryVeryVeryVeryVeryLong === VeryVeryVeryVeryVeryVeryVeryVeryLong) {
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
if (this.hasPlugin("dynamicImports") && this.lookahead().type) {
|
||||
}
|
||||
|
||||
|
@ -145,9 +186,15 @@ if (
|
|||
) {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`inline-jsx.js - flow-verify 1`] = `
|
||||
exports[`inline-jsx.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const user = renderedUser || <div><User name={this.state.user.name} age={this.state.user.age} /></div>;
|
||||
|
||||
const user = renderedUser || shouldRenderUser && <div><User name={this.state.user.name} age={this.state.user.age} /></div>;
|
||||
|
@ -155,7 +202,8 @@ const user = renderedUser || shouldRenderUser && <div><User name={this.state.use
|
|||
const avatar = hasAvatar && <Gravatar user={author} size={size} />;
|
||||
|
||||
const avatar = (hasAvatar || showPlaceholder) && <Gravatar user={author} size={size} />;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const user = renderedUser || (
|
||||
<div>
|
||||
<User name={this.state.user.name} age={this.state.user.age} />
|
||||
|
@ -176,9 +224,15 @@ const avatar = (hasAvatar || showPlaceholder) && (
|
|||
<Gravatar user={author} size={size} />
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`inline-object-array.js - flow-verify 1`] = `
|
||||
exports[`inline-object-array.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
prevState = prevState || {
|
||||
catalogs: [],
|
||||
loadState: LOADED,
|
||||
|
@ -268,7 +322,8 @@ const obj = {
|
|||
},
|
||||
loaded: true
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
prevState = prevState || {
|
||||
catalogs: [],
|
||||
loadState: LOADED,
|
||||
|
@ -363,9 +418,15 @@ const obj = {
|
|||
loaded: true
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`jsx_parent.js - flow-verify 1`] = `
|
||||
exports[`jsx_parent.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
<div
|
||||
src={
|
||||
!isJellyfishEnabled &&
|
||||
|
@ -399,7 +460,8 @@ exports[`jsx_parent.js - flow-verify 1`] = `
|
|||
{!isJellyfishEnabled &&
|
||||
diffUpdateMessageInput != null && child || <div><span>Text</span></div>}
|
||||
</div>;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
<div
|
||||
src={
|
||||
!isJellyfishEnabled &&
|
||||
|
@ -440,9 +502,15 @@ exports[`jsx_parent.js - flow-verify 1`] = `
|
|||
)}
|
||||
</div>;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`math.js - flow-verify 1`] = `
|
||||
exports[`math.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
x + y / z;
|
||||
x / y + z;
|
||||
|
||||
|
@ -465,7 +533,8 @@ x & y & z;
|
|||
x | y | z;
|
||||
x & y >> z;
|
||||
x << y | z;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
x + y / z;
|
||||
x / y + z;
|
||||
|
||||
|
@ -489,9 +558,15 @@ x | y | z;
|
|||
x & (y >> z);
|
||||
(x << y) | z;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`return.js - flow-verify 1`] = `
|
||||
exports[`return.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function foo() {
|
||||
return this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right;
|
||||
}
|
||||
|
@ -507,7 +582,8 @@ function foo() {
|
|||
? true
|
||||
: false;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function foo() {
|
||||
return (
|
||||
this.hasPlugin("dynamicImports") &&
|
||||
|
@ -529,9 +605,15 @@ function foo() {
|
|||
: false;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`short-right.js - flow-verify 1`] = `
|
||||
exports[`short-right.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
this._cumulativeHeights &&
|
||||
Math.abs(
|
||||
this._cachedItemHeight(this._firstVisibleIndex + i) -
|
||||
|
@ -551,7 +633,8 @@ const isPartOfPackageJSON = dependenciesArray.indexOf(
|
|||
defaultContent.filter(defaultLocale => {
|
||||
// ...
|
||||
})[0] || null;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
this._cumulativeHeights &&
|
||||
Math.abs(
|
||||
this._cachedItemHeight(this._firstVisibleIndex + i) -
|
||||
|
@ -569,9 +652,15 @@ defaultContent.filter(defaultLocale => {
|
|||
// ...
|
||||
})[0] || null;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`test.js - flow-verify 1`] = `
|
||||
exports[`test.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// It should always break the highest precedence operators first, and
|
||||
// break them all at the same time.
|
||||
|
||||
|
@ -591,7 +680,8 @@ const x = longVariable * longint && longVariable >> 0 && longVariable + longVari
|
|||
const x = longVariable > longint && longVariable === 0 + longVariable * longVariable;
|
||||
|
||||
foo(obj.property * new Class() && obj instanceof Class && longVariable ? number + 5 : false);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// It should always break the highest precedence operators first, and
|
||||
// break them all at the same time.
|
||||
|
||||
|
@ -651,17 +741,25 @@ foo(
|
|||
: false
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`unary.js - flow-verify 1`] = `
|
||||
const anyTestFailures = !(
|
||||
aggregatedResults.numFailedTests === 0 &&
|
||||
aggregatedResults.numRuntimeErrorTestSuites === 0
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`unary.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const anyTestFailures = !(
|
||||
aggregatedResults.numFailedTests === 0 &&
|
||||
aggregatedResults.numRuntimeErrorTestSuites === 0
|
||||
);
|
||||
|
||||
=====================================output=====================================
|
||||
const anyTestFailures = !(
|
||||
aggregatedResults.numFailedTests === 0 &&
|
||||
aggregatedResults.numRuntimeErrorTestSuites === 0
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`parens.js - flow-verify 1`] = `
|
||||
exports[`parens.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const result = (a + b) >>> 1;
|
||||
var sizeIndex = ((index - 1) >>> level) & MASK;
|
||||
var from = offset > left ? 0 : (left - offset) >> level;
|
||||
|
@ -19,7 +24,8 @@ a % 10 - 5;
|
|||
a * b % 10;
|
||||
a % 10 > 5;
|
||||
a % 10 == 0;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const result = (a + b) >>> 1;
|
||||
var sizeIndex = ((index - 1) >>> level) & MASK;
|
||||
var from = offset > left ? 0 : (left - offset) >> level;
|
||||
|
@ -42,4 +48,5 @@ const rotateY =
|
|||
a % 10 > 5;
|
||||
a % 10 == 0;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,32 +1,52 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`await.js - babylon-verify 1`] = `
|
||||
exports[`await.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const doBothThings = async () => {
|
||||
const request = doAsyncThing();
|
||||
return (await request)::doSyncThing();
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const doBothThings = async () => {
|
||||
const request = doAsyncThing();
|
||||
return (await request)::doSyncThing();
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`await.js - babylon-verify 2`] = `
|
||||
exports[`await.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
semi: false
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const doBothThings = async () => {
|
||||
const request = doAsyncThing();
|
||||
return (await request)::doSyncThing();
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const doBothThings = async () => {
|
||||
const request = doAsyncThing()
|
||||
return (await request)::doSyncThing()
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`bind_parens.js - babylon-verify 1`] = `
|
||||
exports[`bind_parens.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
(a || b)::c;
|
||||
a || (b::c);
|
||||
::obj.prop;
|
||||
|
@ -57,7 +77,8 @@ a::(b.c::d.e)::f.g;
|
|||
b.c::d.e;
|
||||
(b.c::d).e;
|
||||
(b::c::d).e;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
(a || b)::c;
|
||||
a || b::c;
|
||||
::obj.prop;
|
||||
|
@ -89,9 +110,16 @@ b.c::d.e;
|
|||
(b.c::d).e;
|
||||
(b::c::d).e;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`bind_parens.js - babylon-verify 2`] = `
|
||||
exports[`bind_parens.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
semi: false
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
(a || b)::c;
|
||||
a || (b::c);
|
||||
::obj.prop;
|
||||
|
@ -122,7 +150,8 @@ a::(b.c::d.e)::f.g;
|
|||
b.c::d.e;
|
||||
(b.c::d).e;
|
||||
(b::c::d).e;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
;(a || b)::c
|
||||
a || b::c
|
||||
;::obj.prop
|
||||
|
@ -154,9 +183,15 @@ b.c::d.e
|
|||
;(b.c::d).e
|
||||
;(b::c::d).e
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`long_name_method.js - babylon-verify 1`] = `
|
||||
exports[`long_name_method.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class X {
|
||||
constructor() {
|
||||
this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
|
||||
|
@ -165,7 +200,8 @@ class X {
|
|||
testLongNameMethodAndSomethingElseLallala() {
|
||||
return true;
|
||||
}
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
class X {
|
||||
constructor() {
|
||||
this.testLongNameMethodAndSomethingElseLallala =
|
||||
|
@ -177,9 +213,16 @@ class X {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`long_name_method.js - babylon-verify 2`] = `
|
||||
exports[`long_name_method.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
semi: false
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class X {
|
||||
constructor() {
|
||||
this.testLongNameMethodAndSomethingElseLallala = ::this.testLongNameMethodAndSomethingElseLallala;
|
||||
|
@ -188,7 +231,8 @@ class X {
|
|||
testLongNameMethodAndSomethingElseLallala() {
|
||||
return true;
|
||||
}
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
class X {
|
||||
constructor() {
|
||||
this.testLongNameMethodAndSomethingElseLallala =
|
||||
|
@ -200,9 +244,15 @@ class X {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`method_chain.js - babylon-verify 1`] = `
|
||||
exports[`method_chain.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
import {interval} from 'rxjs/observable/interval';
|
||||
import {filter} from 'rxjs/operator/filter';
|
||||
import {take} from 'rxjs/operator/take';
|
||||
|
@ -220,7 +270,8 @@ function test(observable) {
|
|||
)
|
||||
::map(someFunction);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
import { interval } from "rxjs/observable/interval";
|
||||
import { filter } from "rxjs/operator/filter";
|
||||
import { take } from "rxjs/operator/take";
|
||||
|
@ -239,9 +290,16 @@ function test(observable) {
|
|||
::map(someFunction);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`method_chain.js - babylon-verify 2`] = `
|
||||
exports[`method_chain.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
semi: false
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
import {interval} from 'rxjs/observable/interval';
|
||||
import {filter} from 'rxjs/operator/filter';
|
||||
import {take} from 'rxjs/operator/take';
|
||||
|
@ -259,7 +317,8 @@ function test(observable) {
|
|||
)
|
||||
::map(someFunction);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
import { interval } from "rxjs/observable/interval"
|
||||
import { filter } from "rxjs/operator/filter"
|
||||
import { take } from "rxjs/operator/take"
|
||||
|
@ -278,9 +337,15 @@ function test(observable) {
|
|||
::map(someFunction)
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`short_name_method.js - babylon-verify 1`] = `
|
||||
exports[`short_name_method.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class X {
|
||||
constructor() {
|
||||
this.shortMethod = ::this.shortMethod;
|
||||
|
@ -289,7 +354,8 @@ class X {
|
|||
shortMethod() {
|
||||
return true;
|
||||
}
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
class X {
|
||||
constructor() {
|
||||
this.shortMethod = ::this.shortMethod;
|
||||
|
@ -300,9 +366,16 @@ class X {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`short_name_method.js - babylon-verify 2`] = `
|
||||
exports[`short_name_method.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
semi: false
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class X {
|
||||
constructor() {
|
||||
this.shortMethod = ::this.shortMethod;
|
||||
|
@ -311,7 +384,8 @@ class X {
|
|||
shortMethod() {
|
||||
return true;
|
||||
}
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
class X {
|
||||
constructor() {
|
||||
this.shortMethod = ::this.shortMethod
|
||||
|
@ -322,4 +396,5 @@ class X {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,37 +1,67 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`array.js - flow-verify 1`] = `
|
||||
exports[`array.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const arr1 = [1,2,3,4];
|
||||
const arr2 = [1, 2, 3, 4];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const arr1 = [1, 2, 3, 4];
|
||||
const arr2 = [1, 2, 3, 4];
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`array.js - flow-verify 2`] = `
|
||||
exports[`array.js 2`] = `
|
||||
====================================options=====================================
|
||||
bracketSpacing: false
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const arr1 = [1,2,3,4];
|
||||
const arr2 = [1, 2, 3, 4];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const arr1 = [1, 2, 3, 4];
|
||||
const arr2 = [1, 2, 3, 4];
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`object.js - flow-verify 1`] = `
|
||||
exports[`object.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const obj1 = {a:1, b:2, c:3}
|
||||
const obj2 = { a:1, b:2, c:3 };
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const obj1 = { a: 1, b: 2, c: 3 };
|
||||
const obj2 = { a: 1, b: 2, c: 3 };
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`object.js - flow-verify 2`] = `
|
||||
exports[`object.js 2`] = `
|
||||
====================================options=====================================
|
||||
bracketSpacing: false
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const obj1 = {a:1, b:2, c:3}
|
||||
const obj2 = { a:1, b:2, c:3 };
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const obj1 = {a: 1, b: 2, c: 3};
|
||||
const obj2 = {a: 1, b: 2, c: 3};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`break.js - flow-verify 1`] = `
|
||||
exports[`break.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
h(f(g(() => {
|
||||
a
|
||||
})))
|
||||
|
@ -36,7 +41,8 @@ const mapChargeItems = fp.flow(
|
|||
);
|
||||
|
||||
expect(new LongLongLongLongLongRange([0, 0], [0, 0])).toEqualAtomLongLongLongLongRange(new LongLongLongRange([0, 0], [0, 0]));
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
h(
|
||||
f(
|
||||
g(() => {
|
||||
|
@ -78,9 +84,15 @@ expect(
|
|||
new LongLongLongLongLongRange([0, 0], [0, 0])
|
||||
).toEqualAtomLongLongLongLongRange(new LongLongLongRange([0, 0], [0, 0]));
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`parent.js - flow-verify 1`] = `
|
||||
exports[`parent.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
runtimeAgent.getProperties(
|
||||
objectId,
|
||||
false, // ownProperties
|
||||
|
@ -90,7 +102,8 @@ runtimeAgent.getProperties(
|
|||
return 1
|
||||
},
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
runtimeAgent.getProperties(
|
||||
objectId,
|
||||
false, // ownProperties
|
||||
|
@ -101,4 +114,5 @@ runtimeAgent.getProperties(
|
|||
}
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`comments.js - flow-verify 1`] = `
|
||||
exports[`comments.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class A // comment 1
|
||||
// comment 2
|
||||
extends B {}
|
||||
|
@ -49,7 +54,8 @@ export class SnapshotLogger {
|
|||
) {
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class A // comment 1
|
||||
// comment 2
|
||||
extends B {}
|
||||
|
@ -102,4 +108,5 @@ export class SnapshotLogger {
|
|||
) {}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`extends.js - flow-verify 1`] = `
|
||||
exports[`extends.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// "ArrowFunctionExpression"
|
||||
class a extends (() => {}) {}
|
||||
|
||||
|
@ -58,7 +63,8 @@ function* f() {
|
|||
}
|
||||
|
||||
x = class extends (++b) {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// "ArrowFunctionExpression"
|
||||
class a extends (() => {}) {}
|
||||
|
||||
|
@ -117,4 +123,5 @@ function* f() {
|
|||
|
||||
x = class extends (++b) {};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,19 +1,31 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`binary.js - flow-verify 1`] = `
|
||||
exports[`binary.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
(class {}) + 1;
|
||||
(class a {}) + 1;
|
||||
(class extends b {}) + 1;
|
||||
(class a extends b {}) + 1;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
(class {} + 1);
|
||||
(class a {} + 1);
|
||||
(class extends b {} + 1);
|
||||
(class a extends b {} + 1);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`break.js - flow-verify 1`] = `
|
||||
exports[`break.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class MyContractSelectionWidget extends React.Component<void, MyContractSelectionWidgetPropsType, void> implements SomethingLarge {
|
||||
method() {}
|
||||
}
|
||||
|
@ -49,7 +61,8 @@ export class VisTimelineComponent
|
|||
export class VisTimelineComponent2
|
||||
implements AfterViewInit, OnChanges, OnDestroy, AndSomethingReallyReallyLong {
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class MyContractSelectionWidget
|
||||
extends React.Component<void, MyContractSelectionWidgetPropsType, void>
|
||||
implements SomethingLarge {
|
||||
|
@ -89,16 +102,29 @@ export class VisTimelineComponent2
|
|||
OnDestroy,
|
||||
AndSomethingReallyReallyLong {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`call.js - flow-verify 1`] = `
|
||||
exports[`call.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
(class {})(class {});
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
(class {}(class {}));
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`empty.js - flow-verify 1`] = `
|
||||
exports[`empty.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class A {
|
||||
// comment
|
||||
}
|
||||
|
@ -112,7 +138,8 @@ class A {
|
|||
class A {
|
||||
m() {}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class A {
|
||||
// comment
|
||||
}
|
||||
|
@ -127,18 +154,31 @@ class A {
|
|||
m() {}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`member.js - flow-verify 1`] = `
|
||||
exports[`member.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
(class {})[1];
|
||||
(class {}).a;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
(class {}[1]);
|
||||
(class {}.a);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`method.js - flow-verify 1`] = `
|
||||
exports[`method.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
class C {
|
||||
name/*comment*/() {
|
||||
|
@ -150,7 +190,8 @@ class C {
|
|||
name/*comment*/() {
|
||||
}
|
||||
});
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class C {
|
||||
name /*comment*/() {}
|
||||
}
|
||||
|
@ -159,9 +200,15 @@ class C {
|
|||
name /*comment*/() {}
|
||||
});
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`property.js - flow-verify 1`] = `
|
||||
exports[`property.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class A {
|
||||
foobar =
|
||||
// comment to break
|
||||
|
@ -180,7 +227,8 @@ class B {
|
|||
someInstanceProperty3 =
|
||||
"foo";
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class A {
|
||||
foobar =
|
||||
// comment to break
|
||||
|
@ -200,11 +248,19 @@ class B {
|
|||
someInstanceProperty3 = "foo";
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`ternary.js - flow-verify 1`] = `
|
||||
exports[`ternary.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
if (1) (class {}) ? 1 : 2;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
if (1) (class {} ? 1 : 2);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`example.js - babylon-verify 1`] = `
|
||||
super();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`example.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
super();
|
||||
|
||||
=====================================output=====================================
|
||||
super();
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`private_fields.js - babylon-verify 1`] = `
|
||||
exports[`private_fields.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class A { #x; #y; }
|
||||
class B { #x = 0; #y = 1; }
|
||||
|
||||
|
@ -33,7 +38,8 @@ class Point {
|
|||
|
||||
toString() { return \`Point<\${ this.#x },\${ this.#y }>\` }
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class A {
|
||||
#x;
|
||||
#y;
|
||||
|
@ -85,9 +91,16 @@ class Point {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`private_fields.js - babylon-verify 2`] = `
|
||||
exports[`private_fields.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
semi: false
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class A { #x; #y; }
|
||||
class B { #x = 0; #y = 1; }
|
||||
|
||||
|
@ -120,7 +133,8 @@ class Point {
|
|||
|
||||
toString() { return \`Point<\${ this.#x },\${ this.#y }>\` }
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class A {
|
||||
#x
|
||||
#y
|
||||
|
@ -172,17 +186,15 @@ class Point {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`with_comments.js - babylon-verify 1`] = `
|
||||
class A {
|
||||
#foobar =
|
||||
// comment to break
|
||||
1 +
|
||||
// comment to break again
|
||||
2;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`with_comments.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class A {
|
||||
#foobar =
|
||||
// comment to break
|
||||
|
@ -191,9 +203,25 @@ class A {
|
|||
2;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
class A {
|
||||
#foobar =
|
||||
// comment to break
|
||||
1 +
|
||||
// comment to break again
|
||||
2;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`with_comments.js - babylon-verify 2`] = `
|
||||
exports[`with_comments.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
semi: false
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class A {
|
||||
#foobar =
|
||||
// comment to break
|
||||
|
@ -201,7 +229,8 @@ class A {
|
|||
// comment to break again
|
||||
2;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class A {
|
||||
#foobar =
|
||||
// comment to break
|
||||
|
@ -210,4 +239,5 @@ class A {
|
|||
2
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`assignment-pattern.js - flow-verify 1`] = `
|
||||
exports[`assignment-pattern.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const { a /* comment */ = 1 } = b;
|
||||
|
||||
const { c = 1 /* comment */ } = d;
|
||||
|
||||
let {a //comment
|
||||
= b} = c
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const { a /* comment */ = 1 } = b;
|
||||
|
||||
const { c = 1 /* comment */ } = d;
|
||||
|
@ -16,16 +22,23 @@ let {
|
|||
a = b //comment
|
||||
} = c;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`before-comma.js - flow-verify 1`] = `
|
||||
exports[`before-comma.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const foo = {
|
||||
a: 'a' /* comment for this line */,
|
||||
|
||||
/* Section B */
|
||||
b: 'b',
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const foo = {
|
||||
a: "a" /* comment for this line */,
|
||||
|
||||
|
@ -33,9 +46,15 @@ const foo = {
|
|||
b: "b"
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`binary-expressions.js - flow-verify 1`] = `
|
||||
exports[`binary-expressions.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function addition() {
|
||||
0
|
||||
// Comment
|
||||
|
@ -107,7 +126,8 @@ function bitwiseXor() {
|
|||
// Comment
|
||||
^ x
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function addition() {
|
||||
0 +
|
||||
// Comment
|
||||
|
@ -180,31 +200,15 @@ function bitwiseXor() {
|
|||
x;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`blank.js - flow-verify 1`] = `
|
||||
// This file only
|
||||
// has comments. This comment
|
||||
// should still exist
|
||||
//
|
||||
// when printed.
|
||||
|
||||
/**
|
||||
* @typedef {DataDrivenMapping|ConstantMapping} Mapping
|
||||
*/
|
||||
/**
|
||||
* @typedef {Object.<String, Mapping>} ConfigurationMapping
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Function} D3Scale - a D3 scale
|
||||
* @property {Function} ticks
|
||||
* @property {Function} tickFormat
|
||||
*/
|
||||
// comment
|
||||
|
||||
// comment
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`blank.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// This file only
|
||||
// has comments. This comment
|
||||
// should still exist
|
||||
|
@ -227,9 +231,38 @@ exports[`blank.js - flow-verify 1`] = `
|
|||
|
||||
// comment
|
||||
|
||||
=====================================output=====================================
|
||||
// This file only
|
||||
// has comments. This comment
|
||||
// should still exist
|
||||
//
|
||||
// when printed.
|
||||
|
||||
/**
|
||||
* @typedef {DataDrivenMapping|ConstantMapping} Mapping
|
||||
*/
|
||||
/**
|
||||
* @typedef {Object.<String, Mapping>} ConfigurationMapping
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Function} D3Scale - a D3 scale
|
||||
* @property {Function} ticks
|
||||
* @property {Function} tickFormat
|
||||
*/
|
||||
// comment
|
||||
|
||||
// comment
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`break-continue-statements.js - flow-verify 1`] = `
|
||||
exports[`break-continue-statements.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
for (;;) {
|
||||
break /* comment */;
|
||||
continue /* comment */;
|
||||
|
@ -241,7 +274,8 @@ loop: for (;;) {
|
|||
continue /* comment */ loop;
|
||||
continue loop /* comment */;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
for (;;) {
|
||||
break; /* comment */
|
||||
continue; /* comment */
|
||||
|
@ -254,9 +288,15 @@ loop: for (;;) {
|
|||
continue loop /* comment */;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`call_comment.js - flow-verify 1`] = `
|
||||
exports[`call_comment.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
render( // Warm any cache
|
||||
<ChildUpdates renderAnchor={true} anchorClassOn={true} />,
|
||||
container
|
||||
|
@ -266,7 +306,8 @@ React.render( // Warm any cache
|
|||
<ChildUpdates renderAnchor={true} anchorClassOn={true} />,
|
||||
container
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
render(
|
||||
// Warm any cache
|
||||
<ChildUpdates renderAnchor={true} anchorClassOn={true} />,
|
||||
|
@ -279,9 +320,15 @@ React.render(
|
|||
container
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`closure-compiler-type-cast.js - flow-verify 1`] = `
|
||||
exports[`closure-compiler-type-cast.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// test to make sure comments are attached correctly
|
||||
let inlineComment = /* some comment */ (
|
||||
someReallyLongFunctionCall(withLots, ofArguments));
|
||||
|
@ -302,7 +349,8 @@ function returnValue() {
|
|||
var newArray = /** @type {array} */ (numberOrString).map(x => x);
|
||||
var newArray = /** @type {array} */ ((numberOrString)).map(x => x);
|
||||
var newArray = /** @type {array} */ ((numberOrString).map(x => x));
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// test to make sure comments are attached correctly
|
||||
let inlineComment = /* some comment */ someReallyLongFunctionCall(
|
||||
withLots,
|
||||
|
@ -326,9 +374,15 @@ var newArray = /** @type {array} */ (numberOrString).map(x => x);
|
|||
var newArray = /** @type {array} */ (numberOrString).map(x => x);
|
||||
var newArray = /** @type {array} */ (numberOrString.map(x => x));
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`dangling.js - flow-verify 1`] = `
|
||||
exports[`dangling.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
var x = {/* dangling */};
|
||||
var x = {
|
||||
// dangling
|
||||
|
@ -341,7 +395,8 @@ new Thing(/* dangling */);
|
|||
Thing(/* dangling */);
|
||||
declare class Foo extends Qux<string> {/* dangling */}
|
||||
export /* dangling */{};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
var x = {
|
||||
/* dangling */
|
||||
};
|
||||
|
@ -361,38 +416,58 @@ declare class Foo extends Qux<string> {
|
|||
}
|
||||
export /* dangling */{};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`dangling_array.js - flow-verify 1`] = `
|
||||
expect(() => {}).toTriggerReadyStateChanges([
|
||||
// Nothing.
|
||||
]);
|
||||
|
||||
[1 /* first comment */, 2 /* second comment */, 3];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`dangling_array.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
expect(() => {}).toTriggerReadyStateChanges([
|
||||
// Nothing.
|
||||
]);
|
||||
|
||||
[1 /* first comment */, 2 /* second comment */, 3];
|
||||
|
||||
=====================================output=====================================
|
||||
expect(() => {}).toTriggerReadyStateChanges([
|
||||
// Nothing.
|
||||
]);
|
||||
|
||||
[1 /* first comment */, 2 /* second comment */, 3];
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`dangling_for.js - flow-verify 1`] = `
|
||||
exports[`dangling_for.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
for // comment
|
||||
(;;);
|
||||
|
||||
for /* comment */(;;);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// comment
|
||||
for (;;);
|
||||
|
||||
/* comment */
|
||||
for (;;);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`dynamic_imports.js - flow-verify 1`] = `
|
||||
exports[`dynamic_imports.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
import(/* Hello */ 'something')
|
||||
|
||||
import('something' /* Hello */)
|
||||
|
@ -400,7 +475,8 @@ import('something' /* Hello */)
|
|||
import(/* Hello */ 'something' /* Hello */)
|
||||
|
||||
import('something' /* Hello */ + 'else')
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
import(/* Hello */ "something");
|
||||
|
||||
import("something" /* Hello */);
|
||||
|
@ -409,9 +485,15 @@ import(/* Hello */ "something" /* Hello */);
|
|||
|
||||
import("something" /* Hello */ + "else");
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export.js - flow-verify 1`] = `
|
||||
exports[`export.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export //comment
|
||||
{}
|
||||
|
||||
|
@ -430,7 +512,8 @@ export {
|
|||
fooo, // comment
|
||||
barr, // comment
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export //comment
|
||||
{};
|
||||
|
||||
|
@ -450,18 +533,31 @@ export {
|
|||
barr // comment
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`first-line.js - flow-verify 1`] = `
|
||||
exports[`first-line.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a // comment
|
||||
b
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a; // comment
|
||||
b;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`flow_union.js - flow-verify 1`] = `
|
||||
exports[`flow_union.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
type UploadState<E, EM, D>
|
||||
// The upload hasnt begun yet
|
||||
= {type: "Not_begun"}
|
||||
|
@ -481,7 +577,8 @@ type UploadState<E, EM, D>
|
|||
| C
|
||||
// Uploading to aws3 and CreatePostMutation succeeded
|
||||
| D;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
type UploadState<E, EM, D> =
|
||||
// The upload hasnt begun yet
|
||||
| { type: "Not_begun" }
|
||||
|
@ -502,9 +599,15 @@ type UploadState<E, EM, D> =
|
|||
// Uploading to aws3 and CreatePostMutation succeeded
|
||||
| D;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`function-declaration.js - flow-verify 1`] = `
|
||||
exports[`function-declaration.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function a(/* comment */) {} // comment
|
||||
function b() {} // comment
|
||||
function c(/* comment */ argA, argB, argC) {} // comment
|
||||
|
@ -566,7 +669,8 @@ function foo() {
|
|||
// this is a function
|
||||
return 42;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function a(/* comment */) {} // comment
|
||||
function b() {} // comment
|
||||
function c(/* comment */ argA, argB, argC) {} // comment
|
||||
|
@ -629,9 +733,15 @@ function foo() {
|
|||
return 42;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`if.js - flow-verify 1`] = `
|
||||
exports[`if.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
if (1)
|
||||
// comment
|
||||
{
|
||||
|
@ -693,7 +803,8 @@ else if (15) // comment
|
|||
/* comment */
|
||||
/* comment */ // comment
|
||||
true
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
if (1) {
|
||||
// comment
|
||||
false;
|
||||
|
@ -770,9 +881,15 @@ if (14) {
|
|||
/* comment */ // comment
|
||||
true;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issues.js - flow-verify 1`] = `
|
||||
exports[`issues.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Does not need to break as it fits in 80 columns
|
||||
this.call(a, /* comment */ b);
|
||||
|
||||
|
@ -880,7 +997,8 @@ const result = asyncExecute('non_existing_command', /* args */ []);
|
|||
foo({}
|
||||
// Hi
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// Does not need to break as it fits in 80 columns
|
||||
this.call(a, /* comment */ b);
|
||||
|
||||
|
@ -994,9 +1112,15 @@ foo(
|
|||
// Hi
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`jsx.js - flow-verify 1`] = `
|
||||
exports[`jsx.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
<div>
|
||||
{
|
||||
/* comment */
|
||||
|
@ -1117,7 +1241,8 @@ onClick={() => {}}>
|
|||
{}
|
||||
<Component />
|
||||
</Wrapper>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
<div>{/* comment */}</div>;
|
||||
|
||||
<div>{/* comment */}</div>;
|
||||
|
@ -1228,9 +1353,15 @@ onClick={() => {}}>
|
|||
<Component />
|
||||
</Wrapper>;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`last-arg.js - flow-verify 1`] = `
|
||||
exports[`last-arg.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
type f = (
|
||||
currentRequest: {a: number},
|
||||
// TODO this is a very very very very long comment that makes it go > 80 columns
|
||||
|
@ -1325,7 +1456,8 @@ class Foo {
|
|||
lol4 /*string*/
|
||||
) {} /* string*/
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
type f = (
|
||||
currentRequest: { a: number }
|
||||
// TODO this is a very very very very long comment that makes it go > 80 columns
|
||||
|
@ -1413,9 +1545,15 @@ class Foo {
|
|||
) {} /* string*/
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`preserve-new-line-last.js - flow-verify 1`] = `
|
||||
exports[`preserve-new-line-last.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function f() {
|
||||
a
|
||||
/* eslint-disable */
|
||||
|
@ -1437,7 +1575,8 @@ function name() {
|
|||
// comment3 why func3 commented
|
||||
// func3()
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function f() {
|
||||
a;
|
||||
/* eslint-disable */
|
||||
|
@ -1460,9 +1599,15 @@ function name() {
|
|||
// func3()
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`return-statement.js - flow-verify 1`] = `
|
||||
exports[`return-statement.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function jsx() {
|
||||
return (
|
||||
// Comment
|
||||
|
@ -1584,7 +1729,8 @@ function inlineComment() {
|
|||
/* hi */ 42
|
||||
) || 42
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function jsx() {
|
||||
return (
|
||||
// Comment
|
||||
|
@ -1715,9 +1861,15 @@ function inlineComment() {
|
|||
return /* hi */ 42 || 42;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`single-star-jsdoc.js - flow-verify 1`] = `
|
||||
exports[`single-star-jsdoc.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/*
|
||||
* Looking good!
|
||||
*/
|
||||
|
@ -1748,7 +1900,8 @@ if(true) {
|
|||
* Original code by Erik Arvidsson, Mozilla Public License
|
||||
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
|
||||
*/
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/*
|
||||
* Looking good!
|
||||
*/
|
||||
|
@ -1780,9 +1933,15 @@ if (true) {
|
|||
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
|
||||
*/
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`switch.js - flow-verify 1`] = `
|
||||
exports[`switch.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
switch (node && node.type) {
|
||||
case "Property":
|
||||
case "MethodDefinition":
|
||||
|
@ -1821,7 +1980,8 @@ switch (foo) {
|
|||
doThing();
|
||||
} //comment
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
switch (node && node.type) {
|
||||
case "Property":
|
||||
case "MethodDefinition":
|
||||
|
@ -1860,9 +2020,15 @@ switch (foo) {
|
|||
} //comment
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`template-literal.js - flow-verify 1`] = `
|
||||
exports[`template-literal.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
\`
|
||||
\${a // comment
|
||||
}
|
||||
|
@ -1875,7 +2041,8 @@ exports[`template-literal.js - flow-verify 1`] = `
|
|||
d //comment
|
||||
};
|
||||
\`
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
\`
|
||||
\${
|
||||
a // comment
|
||||
|
@ -1891,24 +2058,37 @@ d //comment
|
|||
};
|
||||
\`;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`trailing_space.js - flow-verify 1`] = `
|
||||
exports[`trailing_space.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
#!/there/is-space-here->
|
||||
|
||||
// Do not trim trailing whitespace from this source file!
|
||||
|
||||
// There is some space here ->
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
#!/there/is-space-here->
|
||||
|
||||
// Do not trim trailing whitespace from this source file!
|
||||
|
||||
// There is some space here ->
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`trailing-jsdocs.js - flow-verify 1`] = `
|
||||
exports[`trailing-jsdocs.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const CONNECTION_STATUS = exports.CONNECTION_STATUS = {
|
||||
CLOSED: Object.freeze({ kind: 'CLOSED' }),
|
||||
CONNECTED: Object.freeze({ kind: 'CONNECTED' }),
|
||||
|
@ -1931,7 +2111,8 @@ const CONNECTION_STATUS = exports.CONNECTION_STATUS = {
|
|||
*/ /**
|
||||
* A single unit of data exchanged between the peers of a \`ReactiveSocket\`.
|
||||
*/
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const CONNECTION_STATUS = (exports.CONNECTION_STATUS = {
|
||||
CLOSED: Object.freeze({ kind: "CLOSED" }),
|
||||
CONNECTED: Object.freeze({ kind: "CONNECTED" }),
|
||||
|
@ -1960,9 +2141,15 @@ const CONNECTION_STATUS = (exports.CONNECTION_STATUS = {
|
|||
* A single unit of data exchanged between the peers of a \`ReactiveSocket\`.
|
||||
*/
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`try.js - flow-verify 1`] = `
|
||||
exports[`try.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Comment 1
|
||||
try { // Comment 2
|
||||
// Comment 3
|
||||
|
@ -1976,7 +2163,8 @@ finally { // Comment 8
|
|||
// Comment 9
|
||||
}
|
||||
// Comment 10
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// Comment 1
|
||||
try {
|
||||
// Comment 2
|
||||
|
@ -1992,9 +2180,15 @@ try {
|
|||
}
|
||||
// Comment 10
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`variable_declarator.js - flow-verify 1`] = `
|
||||
exports[`variable_declarator.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
let obj = // Comment
|
||||
{
|
||||
key: 'val'
|
||||
|
@ -2061,7 +2255,8 @@ let // Comment
|
|||
const foo = 123
|
||||
// Nothing to see here.
|
||||
;["2", "3"].forEach(x => console.log(x))
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
let obj =
|
||||
// Comment
|
||||
{
|
||||
|
@ -2135,9 +2330,15 @@ const foo = 123;
|
|||
// Nothing to see here.
|
||||
["2", "3"].forEach(x => console.log(x));
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`while.js - flow-verify 1`] = `
|
||||
exports[`while.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
while(
|
||||
true
|
||||
// Comment
|
||||
|
@ -2158,7 +2359,8 @@ while(
|
|||
while(true) {} // comment
|
||||
|
||||
while(true) /* comment */ ++x;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
while (
|
||||
true
|
||||
// Comment
|
||||
|
@ -2183,4 +2385,5 @@ while (true) {} // comment
|
|||
|
||||
while (true) /* comment */ ++x;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`jsx_same_line.js - flow-verify 1`] = `
|
||||
exports[`jsx_same_line.js 1`] = `
|
||||
====================================options=====================================
|
||||
jsxBracketSameLine: true
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
<div
|
||||
// comment
|
||||
>
|
||||
|
@ -29,7 +35,8 @@ exports[`jsx_same_line.js - flow-verify 1`] = `
|
|||
|
||||
<br // comment
|
||||
/>;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
<div
|
||||
// comment
|
||||
>
|
||||
|
@ -58,4 +65,5 @@ exports[`jsx_same_line.js - flow-verify 1`] = `
|
|||
<br // comment
|
||||
/>;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,16 +1,23 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`pipeline_own_line.js - babylon-verify 1`] = `
|
||||
exports[`pipeline_own_line.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function pipeline() {
|
||||
0
|
||||
// Comment
|
||||
|> x
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function pipeline() {
|
||||
0 |>
|
||||
// Comment
|
||||
x;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`classes.js - flow-verify 1`] = `
|
||||
class c {
|
||||
["i"]() {}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`classes.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class c {
|
||||
["i"]() {}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
class c {
|
||||
["i"]() {}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`comments.js - flow-verify 1`] = `
|
||||
exports[`comments.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
var inspect = 4 === util.inspect.length
|
||||
? // node <= 0.8.x
|
||||
(function(v, colors) {
|
||||
|
@ -38,7 +43,8 @@ const extractTextPluginOptions = shouldUseRelativeAssetPaths // Making sure that
|
|||
const { configureStore } = process.env.NODE_ENV === "production"
|
||||
? require("./configureProdStore") // a
|
||||
: require("./configureDevStore"); // b
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
var inspect =
|
||||
4 === util.inspect.length
|
||||
? // node <= 0.8.x
|
||||
|
@ -80,26 +86,41 @@ const { configureStore } =
|
|||
? require("./configureProdStore") // a
|
||||
: require("./configureDevStore"); // b
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`new-expression.js - flow-verify 1`] = `
|
||||
const testConsole = new TestConsole(
|
||||
config.useStderr ? process.stderr : process.stdout
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`new-expression.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const testConsole = new TestConsole(
|
||||
config.useStderr ? process.stderr : process.stdout
|
||||
);
|
||||
|
||||
=====================================output=====================================
|
||||
const testConsole = new TestConsole(
|
||||
config.useStderr ? process.stderr : process.stdout
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`no-confusing-arrow.js - flow-verify 1`] = `
|
||||
exports[`no-confusing-arrow.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// no-confusing-arrow
|
||||
var x = a => 1 ? 2 : 3;
|
||||
var x = a <= 1 ? 2 : 3;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// no-confusing-arrow
|
||||
var x = a => (1 ? 2 : 3);
|
||||
var x = a <= 1 ? 2 : 3;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`at-root.css - css-verify 1`] = `
|
||||
exports[`at-root.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.parent {
|
||||
@at-root {
|
||||
.child1 {
|
||||
|
@ -293,7 +298,8 @@ red
|
|||
}
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.parent {
|
||||
@at-root {
|
||||
.child1 {
|
||||
|
@ -470,16 +476,23 @@ red
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`charset.css - css-verify 1`] = `
|
||||
exports[`charset.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@charset "UTF-8";
|
||||
@charset "iso-8859-15";
|
||||
@charset 'iso-8859-15'; /* Invalid, wrong quoting style used */
|
||||
@charset "UTF-8"; /* Invalid, more than one space */
|
||||
@charset "UTF-8"; /* Invalid, there is a character (a space) before the at-rule */
|
||||
@charset UTF-8; /* Invalid, without ' or ", the charset is not a CSS <string> */
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@charset "UTF-8";
|
||||
@charset "iso-8859-15";
|
||||
@charset 'iso-8859-15'; /* Invalid, wrong quoting style used */
|
||||
|
@ -487,9 +500,15 @@ exports[`charset.css - css-verify 1`] = `
|
|||
@charset "UTF-8"; /* Invalid, there is a character (a space) before the at-rule */
|
||||
@charset UTF-8; /* Invalid, without ' or ", the charset is not a CSS <string> */
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`counter-style.css - css-verify 1`] = `
|
||||
exports[`counter-style.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@counter-style identifier {
|
||||
system: cyclic;
|
||||
symbols: "\\1F44D";
|
||||
|
@ -559,7 +578,8 @@ suffix
|
|||
;
|
||||
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@counter-style identifier {
|
||||
system: cyclic;
|
||||
symbols: "\\1F44D";
|
||||
|
@ -594,9 +614,15 @@ suffix
|
|||
suffix: " ";
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`custom-media.css - css-verify 1`] = `
|
||||
exports[`custom-media.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@custom-media --small-viewport (max-width: 30em);
|
||||
@custom-media --small-viewport (max-width:30em);
|
||||
@custom-media --small-viewport ( max-width : 30em ) ;
|
||||
|
@ -701,7 +727,8 @@ max-width
|
|||
)
|
||||
|
||||
;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@custom-media --small-viewport (max-width: 30em);
|
||||
@custom-media --small-viewport (max-width: 30em);
|
||||
@custom-media --small-viewport (max-width: 30em);
|
||||
|
@ -723,9 +750,15 @@ max-width
|
|||
@custom-media --tablet (min-width: 768px) and (max-width: 1279px);
|
||||
@custom-media --tablet (min-width: 768px) and (max-width: 1279px);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`custom-selector.css - css-verify 1`] = `
|
||||
exports[`custom-selector.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
|
||||
@custom-selector :--heading h1,h2,h3,h4,h5,h6;
|
||||
@custom-selector :--heading h1 , h2 , h3 , h4 , h5 , h6 ;
|
||||
|
@ -790,7 +823,8 @@ h6
|
|||
@custom-selector :--icon i[class^='icon-'], i[class*=' icon-'];
|
||||
@custom-selector :--placeholder :placehoder-shown, ::-webkit-input-placeholder, ::-moz-placeholder, :-ms-input-placeholder;
|
||||
@custom-selector :--enter :matches(:hover, :focus, :active);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
|
||||
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
|
||||
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
|
||||
|
@ -840,9 +874,15 @@ h6
|
|||
:-ms-input-placeholder;
|
||||
@custom-selector :--enter :matches(:hover, :focus, :active);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`debug.css - css-verify 1`] = `
|
||||
exports[`debug.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@debug 10em + 12em;
|
||||
@debug 10em+12em;
|
||||
@debug 10em + 12em ;
|
||||
|
@ -865,7 +905,8 @@ exports[`debug.css - css-verify 1`] = `
|
|||
|
||||
;
|
||||
@debug $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@debug 10em + 12em;
|
||||
@debug 10em+12em;
|
||||
@debug 10em + 12em;
|
||||
|
@ -875,9 +916,15 @@ exports[`debug.css - css-verify 1`] = `
|
|||
@debug $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var +
|
||||
$very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`each.css - css-verify 1`] = `
|
||||
exports[`each.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@each $animal in puma, sea-slug, egret, salamander {}
|
||||
@each $animal in puma,sea-slug,egret,salamander{}
|
||||
@each $animal in puma , sea-slug , egret , salamander {}
|
||||
|
@ -1095,7 +1142,8 @@ h3
|
|||
{
|
||||
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@each $animal in puma, sea-slug, egret, salamander {
|
||||
}
|
||||
@each $animal in puma, sea-slug, egret, salamander {
|
||||
|
@ -1163,9 +1211,15 @@ h3
|
|||
@each $element, $size in (h1: 20px, h2: 16px, h3: 14px) {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`extend.css - css-verify 1`] = `
|
||||
exports[`extend.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.master {
|
||||
color: black;
|
||||
font-size: 12px;
|
||||
|
@ -1317,7 +1371,8 @@ a.important
|
|||
.message-error {
|
||||
@extend .very-very-very-very-very-very-very-very-very-very-very-very-very-long-selector, .very-very-very-very-very-very-very-very-very-very-very-very-very-long-selector;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.master {
|
||||
color: black;
|
||||
font-size: 12px;
|
||||
|
@ -1414,9 +1469,15 @@ a.important {
|
|||
.very-very-very-very-very-very-very-very-very-very-very-very-very-long-selector;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`font-face.css - css-verify 1`] = `
|
||||
exports[`font-face.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@font-face {
|
||||
font-family: "Open Sans";
|
||||
src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
|
||||
|
@ -1506,7 +1567,8 @@ format(
|
|||
;
|
||||
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@font-face {
|
||||
font-family: "Open Sans";
|
||||
src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
|
||||
|
@ -1539,9 +1601,15 @@ format(
|
|||
url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`font-feature-values.css - css-verify 1`] = `
|
||||
exports[`font-feature-values.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@font-feature-values Font One {
|
||||
@styleset {
|
||||
nice-style: 12;
|
||||
|
@ -1594,7 +1662,8 @@ nice-style
|
|||
}
|
||||
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@font-feature-values Font One {
|
||||
@styleset {
|
||||
nice-style: 12;
|
||||
|
@ -1627,9 +1696,15 @@ nice-style
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`for.css - css-verify 1`] = `
|
||||
exports[`for.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@for $i from 1 through 8 {}
|
||||
@for $i from 1 through 8{}
|
||||
@for $i from 1 through 8 {}
|
||||
|
@ -1673,7 +1748,8 @@ through
|
|||
@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 end $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 {}
|
||||
@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from ($var1 + $var1) through ($var-2 + $var-2) {}
|
||||
@for $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var from ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1 + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var1) through ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2 + $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var-2) {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@for $i from 1 through 8 {
|
||||
}
|
||||
@for $i from 1 through 8 {
|
||||
|
@ -1730,9 +1806,15 @@ through
|
|||
{
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`function.css - css-verify 1`] = `
|
||||
exports[`function.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@function func($arg, $arg1, $arg2: 10, $args...) {
|
||||
@return "Func";
|
||||
}
|
||||
|
@ -1821,7 +1903,8 @@ $args
|
|||
@function func($very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg1, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-arg2: 10, $very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-args...) {
|
||||
@return "Func";
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@function func($arg, $arg1, $arg2: 10, $args...) {
|
||||
@return "Func";
|
||||
}
|
||||
|
@ -1856,9 +1939,15 @@ $args
|
|||
@return "Func";
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`if-else.css - css-verify 1`] = `
|
||||
exports[`if-else.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@if $media == phonePortrait {
|
||||
$k: .15625;
|
||||
} @else if $media == phoneLandscape {
|
||||
|
@ -2004,7 +2093,8 @@ p {
|
|||
@if (str-slice($item, 0, 3) == " : ") {}
|
||||
@if ($type == ocean) {} @else if ($type == matador) {} @else {}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@if $media == phonePortrait {
|
||||
$k: 0.15625;
|
||||
} @else if $media == phoneLandscape {
|
||||
|
@ -2136,9 +2226,15 @@ p {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`import.css - css-verify 1`] = `
|
||||
exports[`import.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@import url("fineprint.css") print;
|
||||
@import url("bluish.css") projection, tv;
|
||||
@import 'custom.css';
|
||||
|
@ -2231,7 +2327,8 @@ $family: unquote("Droid+Sans");
|
|||
@import url(
|
||||
"foo.css,800"
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@import url("fineprint.css") print;
|
||||
@import url("bluish.css") projection, tv;
|
||||
@import "custom.css";
|
||||
|
@ -2313,9 +2410,15 @@ $family: unquote("Droid+Sans");
|
|||
@import "https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600";
|
||||
@import url("foo.css,800");
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`include.css - css-verify 1`] = `
|
||||
exports[`include.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@include mix(1px, 2px, $arg2: 10, 2px 4px 6px);
|
||||
@include mix(1px,2px,$arg2:10,2px 4px 6px);
|
||||
@include mix ( 1px , 2px , $arg2 : 10 , 2px 4px 6px );
|
||||
|
@ -2435,7 +2538,8 @@ border-color: $very-very-very-very-very-very-very-very-very-very-very-very-very-
|
|||
)
|
||||
);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@include mix(1px, 2px, $arg2: 10, 2px 4px 6px);
|
||||
@include mix(1px, 2px, $arg2: 10, 2px 4px 6px);
|
||||
@include mix(1px, 2px, $arg2: 10, 2px 4px 6px);
|
||||
|
@ -2528,9 +2632,15 @@ a {
|
|||
);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`keyframes.css - css-verify 1`] = `
|
||||
exports[`keyframes.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@keyframes identifier {
|
||||
0% {
|
||||
top: 0;
|
||||
|
@ -2757,7 +2867,8 @@ margin-top: 100px;
|
|||
0% { opacity: 0; top: 4rem; }
|
||||
100% { opacity: 1; top: 0; }
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@keyframes identifier {
|
||||
0% {
|
||||
top: 0;
|
||||
|
@ -2901,9 +3012,15 @@ margin-top: 100px;
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`media.css - css-verify 1`] = `
|
||||
exports[`media.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@media screen and (min-width: 480px) {}
|
||||
@media screen and (min-width: 480px) {}
|
||||
@MEDIA screen and (min-width: 480px) {}
|
||||
|
@ -3093,7 +3210,8 @@ black
|
|||
}
|
||||
|
||||
@media all and (-webkit-min-device-pixel-ratio: 1.5), all and (-o-min-device-pixel-ratio: 3/2), all and (min--moz-device-pixel-ratio: 1.5), all and (min-device-pixel-ratio: 1.5) {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@media screen and (min-width: 480px) {
|
||||
}
|
||||
@media screen and (min-width: 480px) {
|
||||
|
@ -3226,9 +3344,15 @@ black
|
|||
all and (min-device-pixel-ratio: 1.5) {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`mixin.css - css-verify 1`] = `
|
||||
exports[`mixin.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@mixin clearfix {}
|
||||
@mixin clearfix{}
|
||||
@mixin clearfix {}
|
||||
|
@ -3336,7 +3460,8 @@ $background
|
|||
@mixin button-variant($foo: " ... ") {}
|
||||
@mixin button-variant($foo: " ... ") {}
|
||||
@mixin sexy-border($color, $width, $foo: (color: red)) {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@mixin clearfix {
|
||||
}
|
||||
@mixin clearfix {
|
||||
|
@ -3399,9 +3524,15 @@ $background
|
|||
@mixin sexy-border($color, $width, $foo: (color: red)) {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`namespaces.css - css-verify 1`] = `
|
||||
exports[`namespaces.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@namespace toto "http://toto.example.org";
|
||||
@namespace toto url("http://toto.example.org");
|
||||
@namespace toto "http://toto.example.org" ;
|
||||
|
@ -3444,7 +3575,8 @@ url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/ve
|
|||
@namespace
|
||||
|
||||
url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@namespace toto "http://toto.example.org";
|
||||
@namespace toto url("http://toto.example.org");
|
||||
@namespace toto "http://toto.example.org";
|
||||
|
@ -3464,9 +3596,15 @@ url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/ve
|
|||
@namespace url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very");
|
||||
@namespace url("http://example.com/foo/very/very/very/very/very/very/very/very/very/very/very/very/very/very/very");
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`page.css - css-verify 1`] = `
|
||||
exports[`page.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@page {
|
||||
margin: 1cm;
|
||||
}
|
||||
|
@ -3536,7 +3674,8 @@ margin
|
|||
@page vertical {
|
||||
size: A4 portrait;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@page {
|
||||
margin: 1cm;
|
||||
}
|
||||
|
@ -3577,9 +3716,15 @@ margin
|
|||
size: A4 portrait;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`return.css - css-verify 1`] = `
|
||||
exports[`return.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@function grid-width($n) {
|
||||
@return $n * $grid-width + ($n - 1) * $gutter-width / 10;
|
||||
}
|
||||
|
@ -3709,7 +3854,8 @@ $gutter-width
|
|||
)
|
||||
;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@function grid-width($n) {
|
||||
@return $n * $grid-width + ($n - 1) * $gutter-width / 10;
|
||||
}
|
||||
|
@ -3756,9 +3902,15 @@ $gutter-width
|
|||
@return map-merge($obj, $ext-obj);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`supports.css - css-verify 1`] = `
|
||||
exports[`supports.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@supports (transform-origin: 5% 5%) {}
|
||||
@supports (transform-origin:5% 5%) {}
|
||||
@supports ( transform-origin : 5% 5% ) {}
|
||||
|
@ -4042,7 +4194,8 @@ run-in
|
|||
@supports not((text-align-last:justify)or(-moz-text-align-last:justify)){ }
|
||||
@supports not((text-align-last:justify)and(-moz-text-align-last:justify)){ }
|
||||
@supports (--foo:green) {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@supports (transform-origin: 5% 5%) {
|
||||
}
|
||||
@supports (transform-origin: 5% 5%) {
|
||||
|
@ -4191,9 +4344,15 @@ run-in
|
|||
@supports (--foo: green) {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`viewport.css - css-verify 1`] = `
|
||||
exports[`viewport.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@viewport {
|
||||
min-width: 640px;
|
||||
max-width: 800px;
|
||||
|
@ -4247,7 +4406,8 @@ max-width
|
|||
;
|
||||
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@viewport {
|
||||
min-width: 640px;
|
||||
max-width: 800px;
|
||||
|
@ -4279,9 +4439,15 @@ max-width
|
|||
max-width: 800px;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`while.css - css-verify 1`] = `
|
||||
exports[`while.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@while $i > 0 {}
|
||||
@while $i>0{}
|
||||
@while $i > 0 {}
|
||||
|
@ -4392,7 +4558,8 @@ $i
|
|||
@while (1 > $very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var) {}
|
||||
@while ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > 1) {}
|
||||
@while ($very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var > $other-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-var) {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@while $i > 0 {
|
||||
}
|
||||
@while $i>0 {
|
||||
|
@ -4467,4 +4634,5 @@ $i
|
|||
) {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`custom-selector.css - css-verify 1`] = `
|
||||
exports[`custom-selector.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@custom-selector :--icon i[class^='icon-'], i[class*=' icon-'];
|
||||
@custom-selector :--icon i[ class ^= 'icon-' ], i[ class *= ' icon-' ];
|
||||
@custom-selector
|
||||
|
@ -17,14 +22,22 @@ class
|
|||
' icon-'
|
||||
]
|
||||
;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@custom-selector :--icon i[class^="icon-"], i[class*=" icon-"];
|
||||
@custom-selector :--icon i[class^="icon-"], i[class*=" icon-"];
|
||||
@custom-selector :--icon i[class^="icon-"], i[class*=" icon-"];
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`custom-selector.css - css-verify 2`] = `
|
||||
exports[`custom-selector.css 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
singleQuote: true
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@custom-selector :--icon i[class^='icon-'], i[class*=' icon-'];
|
||||
@custom-selector :--icon i[ class ^= 'icon-' ], i[ class *= ' icon-' ];
|
||||
@custom-selector
|
||||
|
@ -41,18 +54,26 @@ class
|
|||
' icon-'
|
||||
]
|
||||
;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@custom-selector :--icon i[class^='icon-'], i[class*=' icon-'];
|
||||
@custom-selector :--icon i[class^='icon-'], i[class*=' icon-'];
|
||||
@custom-selector :--icon i[class^='icon-'], i[class*=' icon-'];
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`insensitive.css - css-verify 1`] = `
|
||||
exports[`insensitive.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
input[type="radio" i] {}
|
||||
img[alt~="person" i][src*="lorem" i] {}
|
||||
section:has(:not([type="radio" i], [type="checkbox" i])) {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
input[type="radio" i] {
|
||||
}
|
||||
img[alt~="person" i][src*="lorem" i] {
|
||||
|
@ -60,13 +81,21 @@ img[alt~="person" i][src*="lorem" i] {
|
|||
section:has(:not([type="radio" i], [type="checkbox" i])) {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`insensitive.css - css-verify 2`] = `
|
||||
exports[`insensitive.css 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
singleQuote: true
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
input[type="radio" i] {}
|
||||
img[alt~="person" i][src*="lorem" i] {}
|
||||
section:has(:not([type="radio" i], [type="checkbox" i])) {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
input[type='radio' i] {
|
||||
}
|
||||
img[alt~='person' i][src*='lorem' i] {
|
||||
|
@ -74,15 +103,22 @@ img[alt~='person' i][src*='lorem' i] {
|
|||
section:has(:not([type='radio' i], [type='checkbox' i])) {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`namespaces.css - css-verify 1`] = `
|
||||
exports[`namespaces.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@namespace foo "http://www.example.com";
|
||||
[foo|att=val] {}
|
||||
[*|att] {}
|
||||
[|att] {}
|
||||
[att] {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@namespace foo "http://www.example.com";
|
||||
[foo|att="val"] {
|
||||
}
|
||||
|
@ -93,15 +129,23 @@ exports[`namespaces.css - css-verify 1`] = `
|
|||
[att] {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`namespaces.css - css-verify 2`] = `
|
||||
exports[`namespaces.css 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
singleQuote: true
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@namespace foo "http://www.example.com";
|
||||
[foo|att=val] {}
|
||||
[*|att] {}
|
||||
[|att] {}
|
||||
[att] {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@namespace foo 'http://www.example.com';
|
||||
[foo|att='val'] {
|
||||
}
|
||||
|
@ -112,9 +156,15 @@ exports[`namespaces.css - css-verify 2`] = `
|
|||
[att] {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`quotes.css - css-verify 1`] = `
|
||||
exports[`quotes.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a[id=test] {}
|
||||
a[id="test"] {}
|
||||
a[id='test'] {}
|
||||
|
@ -123,7 +173,8 @@ a[class="(╯°□°)╯︵ ┻━┻"]{}
|
|||
input:not([type="radio"]):not([type="checkbox"]) {}
|
||||
input:not([type="radio"], [type="checkbox"]) {}
|
||||
section:has(:not([type="radio"], [type="checkbox"])) {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a[id="test"] {
|
||||
}
|
||||
a[id="test"] {
|
||||
|
@ -141,9 +192,16 @@ input:not([type="radio"], [type="checkbox"]) {
|
|||
section:has(:not([type="radio"], [type="checkbox"])) {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`quotes.css - css-verify 2`] = `
|
||||
exports[`quotes.css 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
singleQuote: true
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a[id=test] {}
|
||||
a[id="test"] {}
|
||||
a[id='test'] {}
|
||||
|
@ -152,7 +210,8 @@ a[class="(╯°□°)╯︵ ┻━┻"]{}
|
|||
input:not([type="radio"]):not([type="checkbox"]) {}
|
||||
input:not([type="radio"], [type="checkbox"]) {}
|
||||
section:has(:not([type="radio"], [type="checkbox"])) {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a[id='test'] {
|
||||
}
|
||||
a[id='test'] {
|
||||
|
@ -170,9 +229,15 @@ input:not([type='radio'], [type='checkbox']) {
|
|||
section:has(:not([type='radio'], [type='checkbox'])) {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`spaces.css - css-verify 1`] = `
|
||||
exports[`spaces.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
[lang] {}
|
||||
[ lang] {}
|
||||
[lang ] {}
|
||||
|
@ -288,7 +353,8 @@ att
|
|||
|
|
||||
att
|
||||
] {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
[lang] {
|
||||
}
|
||||
[lang] {
|
||||
|
@ -404,9 +470,16 @@ section:has(:not([type="radio" i], [type="checkbox" i])) {
|
|||
[|att] {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`spaces.css - css-verify 2`] = `
|
||||
exports[`spaces.css 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
singleQuote: true
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
[lang] {}
|
||||
[ lang] {}
|
||||
[lang ] {}
|
||||
|
@ -522,7 +595,8 @@ att
|
|||
|
|
||||
att
|
||||
] {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
[lang] {
|
||||
}
|
||||
[lang] {
|
||||
|
@ -638,4 +712,5 @@ section:has(:not([type='radio' i], [type='checkbox' i])) {
|
|||
[|att] {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`atword.css - css-verify 1`] = `
|
||||
exports[`atword.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.test { @color: red; color: @color; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.test {
|
||||
@color: red;
|
||||
color: @color;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`bom.css - css-verify 1`] = `
|
||||
exports[`bom.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
|
||||
/* Block comment */
|
||||
|
@ -9,11 +14,13 @@ html {
|
|||
content: "#{1}";
|
||||
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/* Block comment */
|
||||
|
||||
html {
|
||||
content: "#{1}";
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`case.css - css-verify 1`] = `
|
||||
exports[`case.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@custom-media --KeepName (MIN-WIDTH: 500PX);
|
||||
|
||||
.foo {
|
||||
|
@ -63,7 +68,8 @@ x-panel {
|
|||
:host(:hover) {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@custom-media --KeepName (min-width: 500px);
|
||||
|
||||
.foo {
|
||||
|
@ -128,9 +134,15 @@ x-panel {
|
|||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`case.less - css-verify 1`] = `
|
||||
exports[`case.less 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Convention in this test file:
|
||||
// - The case should be preserved for things prefixed with "Keep".
|
||||
// - The case should always be preserved for element names and attribute names
|
||||
|
@ -275,7 +287,8 @@ a:AFTER {
|
|||
TABLE {}
|
||||
|
||||
.foo { &-KeepSelector {} &-KeepSelector & .KeepClassSelector {} &-100\\.200 {} }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// Convention in this test file:
|
||||
// - The case should be preserved for things prefixed with "Keep".
|
||||
// - The case should always be preserved for element names and attribute names
|
||||
|
@ -437,9 +450,15 @@ table {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`case.scss - css-verify 1`] = `
|
||||
exports[`case.scss 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Convention in this test file:
|
||||
// - The case should be preserved for things prefixed with "Keep".
|
||||
// - The case should always be preserved for element names and attribute names
|
||||
|
@ -587,7 +606,8 @@ a:AFTER {
|
|||
TABLE {}
|
||||
|
||||
.foo { &-KeepSelector {} &-KeepSelector & .KeepClassSelector {} &-100\\.200 {} }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// Convention in this test file:
|
||||
// - The case should be preserved for things prefixed with "Keep".
|
||||
// - The case should always be preserved for element names and attribute names
|
||||
|
@ -747,19 +767,27 @@ table {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`custom-selectors.css - css-verify 1`] = `
|
||||
@custom-selector :--camelCase .my-css-selector;
|
||||
|
||||
:--camelCase {
|
||||
content: red;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`custom-selectors.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@custom-selector :--camelCase .my-css-selector;
|
||||
|
||||
:--camelCase {
|
||||
content: red;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
@custom-selector :--camelCase .my-css-selector;
|
||||
|
||||
:--camelCase {
|
||||
content: red;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`character_escaping.css - css-verify 1`] = `
|
||||
exports[`character_escaping.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
#♥ {}
|
||||
#© {}
|
||||
#“‘’” {}
|
||||
|
@ -49,7 +54,8 @@ exports[`character_escaping.css - css-verify 1`] = `
|
|||
content: "\\21D3";
|
||||
}
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
#♥ {
|
||||
}
|
||||
#© {
|
||||
|
@ -139,4 +145,5 @@ exports[`character_escaping.css - css-verify 1`] = `
|
|||
content: "\\21D3";
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`colon.css - css-verify 1`] = `
|
||||
div {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`colon.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
div {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
div {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`color-adjuster.css - css-verify 1`] = `
|
||||
exports[`color-adjuster.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
color: color(red l(+ 20%));
|
||||
color: color(red w(+ 20%) s(+ 20%));
|
||||
|
@ -122,7 +127,8 @@ exports[`color-adjuster.css - css-verify 1`] = `
|
|||
color: color(red hue(*20deg));
|
||||
color: color(var(--highlightColor) blackness(+ 20%));
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
color: color(red l(+ 20%));
|
||||
color: color(red w(+ 20%) s(+ 20%));
|
||||
|
@ -248,22 +254,35 @@ exports[`color-adjuster.css - css-verify 1`] = `
|
|||
color: color(var(--highlightColor) blackness(+ 20%));
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`current-color.css - css-verify 1`] = `
|
||||
exports[`current-color.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
border: 1px dashed currentColor;
|
||||
border: 1px dashed currentcolor;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
border: 1px dashed currentColor;
|
||||
border: 1px dashed currentcolor;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`functional-syntax.css - css-verify 1`] = `
|
||||
exports[`functional-syntax.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
color: rgb(255, 0, 153);
|
||||
color: rgb(100%, 0%, 60%);
|
||||
|
@ -272,7 +291,8 @@ exports[`functional-syntax.css - css-verify 1`] = `
|
|||
color: hsl(270 60% 50% / .15);
|
||||
color: hsla(240, 100%, 50%, .05)
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
color: rgb(255, 0, 153);
|
||||
color: rgb(100%, 0%, 60%);
|
||||
|
@ -282,9 +302,15 @@ exports[`functional-syntax.css - css-verify 1`] = `
|
|||
color: hsla(240, 100%, 50%, 0.05);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`hexcolor.css - css-verify 1`] = `
|
||||
exports[`hexcolor.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
color: #AAA;
|
||||
-o-color: #fabcd3;
|
||||
|
@ -294,7 +320,8 @@ exports[`hexcolor.css - css-verify 1`] = `
|
|||
color: #F09F;
|
||||
color: #FF0099FF;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
color: #aaa;
|
||||
-o-color: #fabcd3;
|
||||
|
@ -305,9 +332,15 @@ exports[`hexcolor.css - css-verify 1`] = `
|
|||
color: #ff0099ff;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`whitespace-syntax.css - css-verify 1`] = `
|
||||
exports[`whitespace-syntax.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
color: rgba(51 170 51 / 0.4);
|
||||
color: rgba(51 170 51 / 40%);
|
||||
|
@ -315,7 +348,8 @@ exports[`whitespace-syntax.css - css-verify 1`] = `
|
|||
color: hsla(240 100% 50% / .05);
|
||||
color: hsla(240 100% 50% / 5%);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
color: rgba(51 170 51 / 0.4);
|
||||
color: rgba(51 170 51 / 40%);
|
||||
|
@ -324,4 +358,5 @@ exports[`whitespace-syntax.css - css-verify 1`] = `
|
|||
color: hsla(240 100% 50% / 5%);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`combinator.css - css-verify 1`] = `
|
||||
exports[`combinator.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
-Option/root .public/section ~ .public/section:before {
|
||||
}
|
||||
|
||||
|
@ -12,7 +17,8 @@ exports[`combinator.css - css-verify 1`] = `
|
|||
.x .y {}
|
||||
.x
|
||||
.y {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
-Option/root .public/section ~ .public/section:before {
|
||||
}
|
||||
|
||||
|
@ -31,9 +37,15 @@ exports[`combinator.css - css-verify 1`] = `
|
|||
.x .y {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`leading.css - css-verify 1`] = `
|
||||
exports[`leading.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a {
|
||||
> * {
|
||||
}
|
||||
|
@ -42,7 +54,8 @@ a {
|
|||
+ * {
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a {
|
||||
> * {
|
||||
}
|
||||
|
@ -53,4 +66,5 @@ a {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`CRLF.css - css-verify 1`] = `
|
||||
exports[`CRLF.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/*
|
||||
* Comment 1
|
||||
*/
|
||||
|
@ -20,7 +25,8 @@ exports[`CRLF.css - css-verify 1`] = `
|
|||
color: red; /* Comment 5 */
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/*
|
||||
* Comment 1
|
||||
*/
|
||||
|
@ -41,35 +47,15 @@ exports[`CRLF.css - css-verify 1`] = `
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`CRLF.less - css-verify 1`] = `
|
||||
@nice-blue: #5B83AD;
|
||||
@light-blue: @nice-blue + #111;
|
||||
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 2
|
||||
*/
|
||||
#header {
|
||||
// Comment 3
|
||||
/*
|
||||
* Comment 4
|
||||
*/
|
||||
color: @light-blue;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 5
|
||||
*/
|
||||
body {
|
||||
background-color: lightblue; // Comment 6
|
||||
color: red; /* Comment 7 */
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`CRLF.less 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@nice-blue: #5B83AD;
|
||||
@light-blue: @nice-blue + #111;
|
||||
|
||||
|
@ -96,9 +82,42 @@ exports[`CRLF.less - css-verify 1`] = `
|
|||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
@nice-blue: #5B83AD;
|
||||
@light-blue: @nice-blue + #111;
|
||||
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 2
|
||||
*/
|
||||
#header {
|
||||
// Comment 3
|
||||
/*
|
||||
* Comment 4
|
||||
*/
|
||||
color: @light-blue;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
// Comment 1
|
||||
/*
|
||||
* Comment 5
|
||||
*/
|
||||
body {
|
||||
background-color: lightblue; // Comment 6
|
||||
color: red; /* Comment 7 */
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`CRLF.scss - css-verify 1`] = `
|
||||
exports[`CRLF.scss 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$nice-blue: #5B83AD;
|
||||
$light-blue: $nice-blue + #111;
|
||||
|
||||
|
@ -139,7 +158,8 @@ $light-blue: $nice-blue + #111;
|
|||
padding: $padding;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
$nice-blue: #5b83ad;
|
||||
$light-blue: $nice-blue + #111;
|
||||
|
||||
|
@ -181,9 +201,15 @@ $light-blue: $nice-blue + #111;
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`at-rules.css - css-verify 1`] = `
|
||||
exports[`at-rules.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@charset "utf-8"; /* comment 1 */
|
||||
|
||||
@import /* comment 2 */ url("fineprint.css") /* comment 3 */ print /* comment 4 */; /* comment 5 */
|
||||
|
@ -253,7 +279,8 @@ exports[`at-rules.css - css-verify 1`] = `
|
|||
/* comment 213 */ } /* comment 214 */
|
||||
/* comment 215 */ } /* comment 216 */
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@charset "utf-8"; /* comment 1 */
|
||||
|
||||
@import /* comment 2 */ url("fineprint.css") /* comment 3 */ print
|
||||
|
@ -390,16 +417,15 @@ exports[`at-rules.css - css-verify 1`] = `
|
|||
/* comment 215 */
|
||||
} /* comment 216 */
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`block.css - css-verify 1`] = `
|
||||
// Animation definitions cannot cross the shadow boundary,
|
||||
// and thus need to be loaded directly into the atom-text-editor scope.
|
||||
/* Kikoo */
|
||||
/**
|
||||
* Kikoo
|
||||
*/
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`block.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Animation definitions cannot cross the shadow boundary,
|
||||
// and thus need to be loaded directly into the atom-text-editor scope.
|
||||
/* Kikoo */
|
||||
|
@ -407,9 +433,23 @@ exports[`block.css - css-verify 1`] = `
|
|||
* Kikoo
|
||||
*/
|
||||
|
||||
=====================================output=====================================
|
||||
// Animation definitions cannot cross the shadow boundary,
|
||||
// and thus need to be loaded directly into the atom-text-editor scope.
|
||||
/* Kikoo */
|
||||
/**
|
||||
* Kikoo
|
||||
*/
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`bug.css - css-verify 1`] = `
|
||||
exports[`bug.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@font-face {
|
||||
src: url(if(
|
||||
$bootstrap-sass-asset-helper,
|
||||
|
@ -422,7 +462,8 @@ exports[`bug.css - css-verify 1`] = `
|
|||
/* Catchall baseclass */
|
||||
.glyphicon {
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@font-face {
|
||||
src: url(if(
|
||||
$bootstrap-sass-asset-helper,
|
||||
|
@ -436,9 +477,15 @@ exports[`bug.css - css-verify 1`] = `
|
|||
.glyphicon {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`declaration.css - css-verify 1`] = `
|
||||
exports[`declaration.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a {
|
||||
/* comment 1 */
|
||||
/* comment 2 */ padding /* comment 3 */ : /* comment 4 */ 10px /* comment 5 */ 10px /* comment 6 */; /* comment 7 */
|
||||
|
@ -511,7 +558,8 @@ body
|
|||
/* comment 84 */
|
||||
background: #000;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a {
|
||||
/* comment 1 */
|
||||
/* comment 2 */
|
||||
|
@ -601,9 +649,15 @@ body {
|
|||
background: #000;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`if-eslit-at-rule-decloration.scss - css-verify 1`] = `
|
||||
exports[`if-eslit-at-rule-decloration.scss 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@function _normalize-include($section) {
|
||||
// Check if $section is in the $include list.
|
||||
@if index($_normalize-include, $section) {
|
||||
|
@ -615,7 +669,8 @@ exports[`if-eslit-at-rule-decloration.scss - css-verify 1`] = `
|
|||
}
|
||||
@return false;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@function _normalize-include($section) {
|
||||
// Check if $section is in the $include list.
|
||||
@if index($_normalize-include, $section) {
|
||||
|
@ -631,25 +686,39 @@ exports[`if-eslit-at-rule-decloration.scss - css-verify 1`] = `
|
|||
@return false;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`lists.scss - css-verify 1`] = `
|
||||
exports[`lists.scss 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$my-list:
|
||||
'foo', // Foo
|
||||
'bar'; // Bar
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
$my-list: "foo",
|
||||
// Foo
|
||||
"bar"; // Bar
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`maps.scss - css-verify 1`] = `
|
||||
exports[`maps.scss 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$my-map: (
|
||||
'foo': 1, // Foo
|
||||
'bar': 2, // Bar
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
$my-map: (
|
||||
"foo": 1,
|
||||
// Foo
|
||||
|
@ -657,9 +726,15 @@ $my-map: (
|
|||
// Bar
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`places.css - css-verify 1`] = `
|
||||
exports[`places.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
div {
|
||||
// a
|
||||
|
||||
|
@ -668,7 +743,8 @@ div {
|
|||
|
||||
// d
|
||||
div {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
div {
|
||||
// a
|
||||
|
||||
|
@ -679,19 +755,15 @@ div {
|
|||
div {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`prettier-ignore.css - css-verify 1`] = `
|
||||
// prettier-ignore
|
||||
@blue: blue;
|
||||
@black: darkgray;
|
||||
|
||||
foo {
|
||||
/* prettier-ignore */
|
||||
thing: foo;
|
||||
-ms-thing: foo;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`prettier-ignore.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// prettier-ignore
|
||||
@blue: blue;
|
||||
@black: darkgray;
|
||||
|
@ -702,9 +774,26 @@ foo {
|
|||
-ms-thing: foo;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
// prettier-ignore
|
||||
@blue: blue;
|
||||
@black: darkgray;
|
||||
|
||||
foo {
|
||||
/* prettier-ignore */
|
||||
thing: foo;
|
||||
-ms-thing: foo;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`selectors.css - css-verify 1`] = `
|
||||
exports[`selectors.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.powerPathNavigator .helm button.pressedButton, /* comment 1 */
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton),
|
||||
.powerPathNavigator table.powerPathInfo th:active,
|
||||
|
@ -862,7 +951,8 @@ input:not(/* comment 125 */[/* comment 126 */disabled/* comment 127 */]/* commen
|
|||
justify-content: center;
|
||||
};
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.powerPathNavigator .helm button.pressedButton, /* comment 1 */
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton),
|
||||
.powerPathNavigator table.powerPathInfo th:active,
|
||||
|
@ -1100,9 +1190,15 @@ article /* comment 168 */ :--heading /* comment 169 */ + /* comment 170 */ p /*
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`selectors.scss - css-verify 1`] = `
|
||||
exports[`selectors.scss 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.powerPathNavigator .helm button.pressedButton, // comment 1
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton),
|
||||
.powerPathNavigator table.powerPathInfo th:active,
|
||||
|
@ -1165,7 +1261,8 @@ exports[`selectors.scss - css-verify 1`] = `
|
|||
.bar
|
||||
// comment 29
|
||||
{}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.powerPathNavigator .helm button.pressedButton, // comment 1
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton),
|
||||
.powerPathNavigator table.powerPathInfo th:active,
|
||||
|
@ -1232,84 +1329,58 @@ exports[`selectors.scss - css-verify 1`] = `
|
|||
{
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`source-map.css - css-verify 1`] = `
|
||||
exports[`source-map.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=file.css.map */
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=file.css.map */
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`trailing_star_slash.css - css-verify 1`] = `
|
||||
exports[`trailing_star_slash.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@media (max-width: 1) {}
|
||||
a {
|
||||
// element.style */
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@media (max-width: 1) {
|
||||
}
|
||||
a {
|
||||
// element.style */
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`types.css - css-verify 1`] = `
|
||||
/* This is a basic comment */
|
||||
|
||||
/* ==========================================================================
|
||||
This is a Section Comment
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
This is a sub-section comment
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Short description using Doxygen-style comment format
|
||||
*
|
||||
* The first sentence of the long description starts here and continues on this
|
||||
* line for a while finally concluding here at the end of this paragraph.
|
||||
*
|
||||
* The long description is ideal for more detailed explanations and
|
||||
* documentation. It can include example HTML, URLs, or any other information
|
||||
* that is deemed necessary or useful.
|
||||
*
|
||||
* @tag This is a tag named 'tag'
|
||||
*
|
||||
* TODO: This is a todo statement that describes an atomic task to be completed
|
||||
* at a later date. It wraps after 80 characters and following lines are
|
||||
* indented by 2 spaces.
|
||||
*/
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
*
|
||||
* => Write some code
|
||||
* => Make some lists
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
span {
|
||||
color: blue;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
<small class=tooltip><span>Lorem ipsum dolor</span></small>
|
||||
*/
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`types.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/* This is a basic comment */
|
||||
|
||||
/* ==========================================================================
|
||||
|
@ -1356,9 +1427,62 @@ span {
|
|||
<small class=tooltip><span>Lorem ipsum dolor</span></small>
|
||||
*/
|
||||
|
||||
=====================================output=====================================
|
||||
/* This is a basic comment */
|
||||
|
||||
/* ==========================================================================
|
||||
This is a Section Comment
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
This is a sub-section comment
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Short description using Doxygen-style comment format
|
||||
*
|
||||
* The first sentence of the long description starts here and continues on this
|
||||
* line for a while finally concluding here at the end of this paragraph.
|
||||
*
|
||||
* The long description is ideal for more detailed explanations and
|
||||
* documentation. It can include example HTML, URLs, or any other information
|
||||
* that is deemed necessary or useful.
|
||||
*
|
||||
* @tag This is a tag named 'tag'
|
||||
*
|
||||
* TODO: This is a todo statement that describes an atomic task to be completed
|
||||
* at a later date. It wraps after 80 characters and following lines are
|
||||
* indented by 2 spaces.
|
||||
*/
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
*
|
||||
* => Write some code
|
||||
* => Make some lists
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
span {
|
||||
color: blue;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
<small class=tooltip><span>Lorem ipsum dolor</span></small>
|
||||
*/
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`variable-declaration.scss - css-verify 1`] = `
|
||||
exports[`variable-declaration.scss 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$var: /* comment 1 */ all /* comment 2 */ !default /* comment 3 */ ; /* comment 4 */
|
||||
|
||||
@mixin text-color {
|
||||
|
@ -1373,7 +1497,8 @@ $var: /* comment 1 */ all /* comment 2 */ !default /* comment 3 */ ; /* comment
|
|||
/* comment 14 */ $text-color /* comment 15 */ : /* comment 16 */ green /* comment 17 */ !global /* comment 18 */ ; /* comment 19 */
|
||||
/* comment 20 */
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
$var: /* comment 1 */ all /* comment 2 */ !default /* comment 3 */; /* comment 4 */
|
||||
|
||||
@mixin text-color {
|
||||
|
@ -1391,4 +1516,5 @@ $var: /* comment 1 */ all /* comment 2 */ !default /* comment 3 */; /* comment 4
|
|||
/* comment 20 */
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`composes.css - css-verify 1`] = `
|
||||
.reference {
|
||||
composes: selector from "a/long/file/path/exceeding/the/maximum/length/forcing/a/line-wrap/file.css";
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`composes.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.reference {
|
||||
composes: selector from "a/long/file/path/exceeding/the/maximum/length/forcing/a/line-wrap/file.css";
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
.reference {
|
||||
composes: selector from "a/long/file/path/exceeding/the/maximum/length/forcing/a/line-wrap/file.css";
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`empty.css - css-verify 1`] = `
|
||||
exports[`empty.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.ui-syntax-color();
|
||||
|
||||
details[open] {
|
||||
|
@ -10,7 +15,8 @@ div {
|
|||
box-sizing: border-box;;
|
||||
color: red;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.ui-syntax-color();
|
||||
|
||||
details[open] {
|
||||
|
@ -21,4 +27,5 @@ div {
|
|||
color: red;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`fill.css - css-verify 1`] = `
|
||||
exports[`fill.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
div {
|
||||
border-left: 1px solid mix($warningBackgroundColors, $warningBorderColors, 50%);
|
||||
$fontFamily: "Lato", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
div {
|
||||
border-left: 1px solid
|
||||
mix($warningBackgroundColors, $warningBorderColors, 50%);
|
||||
|
@ -13,4 +19,5 @@ div {
|
|||
sans-serif;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`grid.css - css-verify 1`] = `
|
||||
exports[`grid.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/* quotes */
|
||||
div {
|
||||
grid-template-areas:
|
||||
|
@ -115,7 +120,8 @@ div {
|
|||
grid-area: main;
|
||||
grid-area: 1 / main-start / 3 / main-end;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/* quotes */
|
||||
div {
|
||||
grid-template-areas:
|
||||
|
@ -231,4 +237,5 @@ div {
|
|||
grid-area: 1 / main-start / 3 / main-end;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`important.css - css-verify 1`] = `
|
||||
div {
|
||||
max-height: none !important;
|
||||
}
|
||||
|
||||
.important {
|
||||
.foo() !important;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`important.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
div {
|
||||
max-height: none !important;
|
||||
}
|
||||
|
@ -17,4 +14,14 @@ div {
|
|||
.foo() !important;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
div {
|
||||
max-height: none !important;
|
||||
}
|
||||
|
||||
.important {
|
||||
.foo() !important;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`indent.css - css-verify 1`] = `
|
||||
exports[`indent.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
div {
|
||||
background: var(fig-light-02) url(/images/inset-shadow-east-ltr.png) 100% 0 repeat-y;
|
||||
box-shadow: 0 0 1px 2px rgba(88, 144, 255, 0.75), 0 1px 1px rgba(0, 0, 0, 0.15);
|
||||
padding-bottom: calc(var(ads-help-tray-footer-with-support-link-height) + var(ads-help-tray-header-height-new));
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
div {
|
||||
background: var(fig-light-02) url(/images/inset-shadow-east-ltr.png) 100% 0
|
||||
repeat-y;
|
||||
|
@ -18,16 +24,23 @@ div {
|
|||
);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`selectors.css - css-verify 1`] = `
|
||||
exports[`selectors.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a {
|
||||
~ .Pagination-itemWrapper:not(.is-separator):not([data-priority^='#{$priority}'])
|
||||
~ .Pagination-itemWrapper.is-separator[data-priority^='#{$priority}'] {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a {
|
||||
~ .Pagination-itemWrapper:not(.is-separator):not([data-priority^="#{$priority}"])
|
||||
~ .Pagination-itemWrapper.is-separator[data-priority^="#{$priority}"] {
|
||||
|
@ -35,4 +48,5 @@ a {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,17 +1,29 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`empty.css - css-verify 1`] = `
|
||||
@font-face {
|
||||
src: url();
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`empty.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@font-face {
|
||||
src: url();
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
@font-face {
|
||||
src: url();
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`inline_url.css - css-verify 1`] = `
|
||||
exports[`inline_url.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.breadItem {
|
||||
background-image: url('/images/product/simple_product_manager/breadcrumb/chevron_right.png');
|
||||
background-image: url(/images/product/simple_product_manager/breadcrumb/chevron_right.png);
|
||||
|
@ -21,7 +33,8 @@ exports[`inline_url.css - css-verify 1`] = `
|
|||
background-image: url(data:application/font-woff;charset=utf-8;base64,ThisIsNormalBut/+0ThisIsLowerCased);
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO4/B8AAqgB0yr7dJgAAAAASUVORK5CYII=) center center no-repeat;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.breadItem {
|
||||
background-image: url("/images/product/simple_product_manager/breadcrumb/chevron_right.png");
|
||||
background-image: url(/images/product/simple_product_manager/breadcrumb/chevron_right.png);
|
||||
|
@ -33,4 +46,5 @@ exports[`inline_url.css - css-verify 1`] = `
|
|||
center center no-repeat;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`less.less - less-verify 1`] = `
|
||||
exports[`less.less 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["less"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@nice-blue: #5B83AD;
|
||||
@light-blue: @nice-blue + #111;
|
||||
|
||||
|
@ -1662,7 +1667,8 @@ li + li {
|
|||
// Usage
|
||||
@import // Comment
|
||||
"@{themes}/tidal-wave.less";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@nice-blue: #5b83ad;
|
||||
@light-blue: @nice-blue + #111;
|
||||
|
||||
|
@ -3257,4 +3263,5 @@ li + li {
|
|||
@import // Comment
|
||||
"@{themes}/tidal-wave.less";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`long_rule.css - css-verify 1`] = `
|
||||
.nuclide-resize-sensitive-container-sensor,
|
||||
.nuclide-resize-sensitive-container-expand,
|
||||
.nuclide-resize-sensitive-container-shrink {
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`long_rule.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.nuclide-resize-sensitive-container-sensor,
|
||||
.nuclide-resize-sensitive-container-expand,
|
||||
.nuclide-resize-sensitive-container-shrink {
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
.nuclide-resize-sensitive-container-sensor,
|
||||
.nuclide-resize-sensitive-container-expand,
|
||||
.nuclide-resize-sensitive-container-shrink {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,53 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`modules.css - css-verify 1`] = `
|
||||
@value colors: './colors.css';
|
||||
@value first, second, third from colors;
|
||||
|
||||
.title {
|
||||
@nest :global(h1)& {
|
||||
background: red;
|
||||
}
|
||||
}
|
||||
|
||||
.className {
|
||||
color: green;
|
||||
background: red;
|
||||
}
|
||||
|
||||
.otherClassName {
|
||||
composes: className;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.otherClassName {
|
||||
composes: className from "./style.css";
|
||||
}
|
||||
|
||||
.otherClassName {
|
||||
composes: globalClassName from global;
|
||||
}
|
||||
|
||||
:global {
|
||||
.global-class-name {
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
|
||||
.root :global .text {
|
||||
color: brown;
|
||||
font-size: 24px;
|
||||
font-family: helvetica, arial, sans-serif;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
:import("path/to/dep.css") {
|
||||
localAlias: keyFromDep;
|
||||
}
|
||||
:export {
|
||||
exportedKey: exportedValue;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`modules.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@value colors: './colors.css';
|
||||
@value first, second, third from colors;
|
||||
|
||||
|
@ -95,4 +53,53 @@ exports[`modules.css - css-verify 1`] = `
|
|||
exportedKey: exportedValue;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
@value colors: './colors.css';
|
||||
@value first, second, third from colors;
|
||||
|
||||
.title {
|
||||
@nest :global(h1)& {
|
||||
background: red;
|
||||
}
|
||||
}
|
||||
|
||||
.className {
|
||||
color: green;
|
||||
background: red;
|
||||
}
|
||||
|
||||
.otherClassName {
|
||||
composes: className;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.otherClassName {
|
||||
composes: className from "./style.css";
|
||||
}
|
||||
|
||||
.otherClassName {
|
||||
composes: globalClassName from global;
|
||||
}
|
||||
|
||||
:global {
|
||||
.global-class-name {
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
|
||||
.root :global .text {
|
||||
color: brown;
|
||||
font-size: 24px;
|
||||
font-family: helvetica, arial, sans-serif;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
:import("path/to/dep.css") {
|
||||
localAlias: keyFromDep;
|
||||
}
|
||||
:export {
|
||||
exportedKey: exportedValue;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`numbers.css - css-verify 1`] = `
|
||||
exports[`numbers.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@supports (margin: .5px ".30px" 1E+2px) {
|
||||
a {
|
||||
a: 0;
|
||||
|
@ -74,7 +79,8 @@ exports[`numbers.css - css-verify 1`] = `
|
|||
|
||||
@media only screen and (-webkit-min-device-pixel-ratio : .5), only screen and (min-device-pixel-ratio : .5) { }
|
||||
@include single-transition(transform, .5s ease);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@supports (margin: 0.5px ".30px" 1e2px) {
|
||||
a {
|
||||
a: 0;
|
||||
|
@ -151,4 +157,5 @@ exports[`numbers.css - css-verify 1`] = `
|
|||
}
|
||||
@include single-transition(transform, 0.5s ease);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`params.css - css-verify 1`] = `
|
||||
.clusterPlannerDialog input[type="text"],
|
||||
.clusterPlannerDialog .uiTypeahead {
|
||||
width: 220px;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`params.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.clusterPlannerDialog input[type="text"],
|
||||
.clusterPlannerDialog .uiTypeahead {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
.clusterPlannerDialog input[type="text"],
|
||||
.clusterPlannerDialog .uiTypeahead {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`parens.css - css-verify 1`] = `
|
||||
exports[`parens.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a {
|
||||
prop1: func(1px,1px,1px,func(1px,1px,1px,func(1px,1px,1px)));
|
||||
prop2: func( 1px ,1px ,1px ,func( 1px ,1px ,1px ,func( 1px ,1px ,1px ) ) );
|
||||
|
@ -303,7 +308,8 @@ a {
|
|||
unicode-range: U+4??; /* wildcard range */
|
||||
unicode-range: U+0025-00FF, U+4??; /* multiple values */
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a {
|
||||
prop1: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px)));
|
||||
prop2: func(1px, 1px, 1px, func(1px, 1px, 1px, func(1px, 1px, 1px)));
|
||||
|
@ -516,4 +522,5 @@ a {
|
|||
unicode-range: U+0025-00FF, U+4??; /* multiple values */
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`postcss-mixins.css - css-verify 1`] = `
|
||||
exports[`postcss-mixins.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a {
|
||||
@mixin $(theme)-colors;
|
||||
}
|
||||
|
@ -33,7 +38,8 @@ a {
|
|||
@mixin child;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a {
|
||||
@mixin $(theme)-colors;
|
||||
}
|
||||
|
@ -67,9 +73,15 @@ a {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`postcss-nested.css - css-verify 1`] = `
|
||||
exports[`postcss-nested.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.phone {
|
||||
&_title {
|
||||
width: 500px;
|
||||
|
@ -84,7 +96,8 @@ exports[`postcss-nested.css - css-verify 1`] = `
|
|||
display: block;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.phone {
|
||||
&_title {
|
||||
width: 500px;
|
||||
|
@ -100,9 +113,15 @@ exports[`postcss-nested.css - css-verify 1`] = `
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`postcss-nested-props.css - css-verify 1`] = `
|
||||
exports[`postcss-nested-props.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.funky {
|
||||
font: {
|
||||
family: fantasy;
|
||||
|
@ -116,7 +135,8 @@ exports[`postcss-nested-props.css - css-verify 1`] = `
|
|||
weight: bold;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.funky {
|
||||
font: {
|
||||
family: fantasy;
|
||||
|
@ -131,9 +151,15 @@ exports[`postcss-nested-props.css - css-verify 1`] = `
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`postcss-nesting.css - css-verify 1`] = `
|
||||
exports[`postcss-nesting.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a {
|
||||
order: 1;
|
||||
@nest b & {
|
||||
|
@ -335,7 +361,8 @@ a {
|
|||
order: 2;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a {
|
||||
order: 1;
|
||||
@nest b & {
|
||||
|
@ -551,9 +578,15 @@ a {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`postcss-simple-vars.css - css-verify 1`] = `
|
||||
exports[`postcss-simple-vars.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
background-color: $$(style)Color;
|
||||
background-color: $$(style)Color Color122;
|
||||
color: @@color;
|
||||
|
@ -563,7 +596,8 @@ border: 1px solid var(--border-color);
|
|||
color: $(style)color;
|
||||
color: @@(style) color123;
|
||||
color: @@(style)color123;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
background-color: $$(style)Color;
|
||||
background-color: $$(style)Color Color122;
|
||||
color: @@color;
|
||||
|
@ -574,4 +608,5 @@ color: $(style) color;
|
|||
color: @@(style) color123;
|
||||
color: @@(style) color123;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`prefix.css - css-verify 1`] = `
|
||||
div {
|
||||
margin-left: -@leftMargin;
|
||||
transform: translateY(-@offset);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`prefix.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
div {
|
||||
margin-left: -@leftMargin;
|
||||
transform: translateY(-@offset);
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
div {
|
||||
margin-left: -@leftMargin;
|
||||
transform: translateY(-@offset);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`pseudo_call.css - css-verify 1`] = `
|
||||
div:not(:last-child) {
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`pseudo_call.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
div:not(:last-child) {
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
div:not(:last-child) {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`quotes.css - css-verify 1`] = `
|
||||
exports[`quotes.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@charset "UTF-8";
|
||||
/* @charset must always have double quotes: https://www.w3.org/TR/css-syntax-3/#determine-the-fallback-encoding */
|
||||
/* Also, it has to be the very first thing in the file, but here are some more tests anyway: */
|
||||
|
@ -92,7 +97,8 @@ exports[`quotes.css - css-verify 1`] = `
|
|||
|
||||
one "two" three {}
|
||||
one 'two' three {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@charset "UTF-8";
|
||||
/* @charset must always have double quotes: https://www.w3.org/TR/css-syntax-3/#determine-the-fallback-encoding */
|
||||
/* Also, it has to be the very first thing in the file, but here are some more tests anyway: */
|
||||
|
@ -187,9 +193,16 @@ one "two" three {
|
|||
one "two" three {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`quotes.css - css-verify 2`] = `
|
||||
exports[`quotes.css 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
singleQuote: true
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@charset "UTF-8";
|
||||
/* @charset must always have double quotes: https://www.w3.org/TR/css-syntax-3/#determine-the-fallback-encoding */
|
||||
/* Also, it has to be the very first thing in the file, but here are some more tests anyway: */
|
||||
|
@ -281,7 +294,8 @@ exports[`quotes.css - css-verify 2`] = `
|
|||
|
||||
one "two" three {}
|
||||
one 'two' three {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@charset "UTF-8";
|
||||
/* @charset must always have double quotes: https://www.w3.org/TR/css-syntax-3/#determine-the-fallback-encoding */
|
||||
/* Also, it has to be the very first thing in the file, but here are some more tests anyway: */
|
||||
|
@ -376,4 +390,5 @@ one 'two' three {
|
|||
one 'two' three {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,13 +1,25 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`import_comma.scss - scss-verify 1`] = `
|
||||
@import "rounded-corners", "text-shadow";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`import_comma.scss 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@import "rounded-corners", "text-shadow";
|
||||
|
||||
=====================================output=====================================
|
||||
@import "rounded-corners", "text-shadow";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`scss.scss - scss-verify 1`] = `
|
||||
exports[`scss.scss 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@media #{$g-breakpoint-tiny} {}
|
||||
.#{$fa-css-prefix}-glass:before { content: $fa-var-glass; }
|
||||
a {height: calc(#{$foo} + 1);}
|
||||
|
@ -1048,7 +1060,8 @@ $my-map: (
|
|||
.something {
|
||||
grid-template-columns: 1 2fr (3 + 4);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@media #{$g-breakpoint-tiny} {
|
||||
}
|
||||
.#{$fa-css-prefix}-glass:before {
|
||||
|
@ -2002,4 +2015,5 @@ $my-map: (
|
|||
grid-template-columns: 1 2fr (3 + 4);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`call.css - css-verify 1`] = `
|
||||
exports[`call.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.e:extend(.f, .g) {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.e:extend(.f, .g) {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`selectors.css - css-verify 1`] = `
|
||||
exports[`selectors.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.a,.b,.c {}
|
||||
.r { &, &:hover {} }
|
||||
|
||||
|
@ -312,7 +317,8 @@ ns|* {}
|
|||
*|* {}
|
||||
|
||||
|* {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.a,
|
||||
.b,
|
||||
.c {
|
||||
|
@ -701,4 +707,5 @@ ns|* {
|
|||
|* {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`string.css - css-verify 1`] = `
|
||||
:not(".public/basics/positioning") {
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`string.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
:not(".public/basics/positioning") {
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
:not(".public/basics/positioning") {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`at-rules.css - css-verify 1`] = `
|
||||
exports[`at-rules.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a {
|
||||
@include section-type-1(
|
||||
$header:
|
||||
|
@ -34,7 +39,8 @@ box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15),
|
|||
)
|
||||
);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a {
|
||||
@include section-type-1(
|
||||
$header: (
|
||||
|
@ -66,9 +72,16 @@ a {
|
|||
);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`at-rules.css - scss-verify 1`] = `
|
||||
exports[`at-rules.css 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
trailingComma: "es5"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a {
|
||||
@include section-type-1(
|
||||
$header:
|
||||
|
@ -102,7 +115,8 @@ box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15),
|
|||
)
|
||||
);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a {
|
||||
@include section-type-1(
|
||||
$header: (
|
||||
|
@ -134,31 +148,52 @@ a {
|
|||
);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`declaration.css - css-verify 1`] = `
|
||||
exports[`declaration.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a {
|
||||
margin: $bar,;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a {
|
||||
margin: $bar;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`declaration.css - scss-verify 1`] = `
|
||||
exports[`declaration.css 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
trailingComma: "es5"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
a {
|
||||
margin: $bar,;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
a {
|
||||
margin: $bar;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`list.css - css-verify 1`] = `
|
||||
exports[`list.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$colors: hotpink deepskyblue firebrick,;
|
||||
$list: (a,);
|
||||
$list: ('Helvetica', 'Arial', sans-serif,);
|
||||
|
@ -207,7 +242,8 @@ $breakpoint-map: (
|
|||
vertical-rhythm: 1.618
|
||||
)
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
$colors: hotpink deepskyblue firebrick;
|
||||
$list: (a);
|
||||
$list: ("Helvetica", "Arial", sans-serif);
|
||||
|
@ -254,9 +290,16 @@ $breakpoint-map: (
|
|||
)
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`list.css - scss-verify 1`] = `
|
||||
exports[`list.css 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
trailingComma: "es5"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$colors: hotpink deepskyblue firebrick,;
|
||||
$list: (a,);
|
||||
$list: ('Helvetica', 'Arial', sans-serif,);
|
||||
|
@ -305,7 +348,8 @@ $breakpoint-map: (
|
|||
vertical-rhythm: 1.618
|
||||
)
|
||||
);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
$colors: hotpink deepskyblue firebrick;
|
||||
$list: (a);
|
||||
$list: ("Helvetica", "Arial", sans-serif);
|
||||
|
@ -352,9 +396,15 @@ $breakpoint-map: (
|
|||
),
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`map.css - css-verify 1`] = `
|
||||
exports[`map.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$map: (
|
||||
small: 767px,
|
||||
medium: 992px,
|
||||
|
@ -366,7 +416,8 @@ $map: (
|
|||
'huge': (min-width: 1200px),
|
||||
);
|
||||
$map: ( small: 767px, medium: 992px, large: 1200px );
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
$map: (
|
||||
small: 767px,
|
||||
medium: 992px,
|
||||
|
@ -389,9 +440,16 @@ $map: (
|
|||
large: 1200px
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`map.css - scss-verify 1`] = `
|
||||
exports[`map.css 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
trailingComma: "es5"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$map: (
|
||||
small: 767px,
|
||||
medium: 992px,
|
||||
|
@ -403,7 +461,8 @@ $map: (
|
|||
'huge': (min-width: 1200px),
|
||||
);
|
||||
$map: ( small: 767px, medium: 992px, large: 1200px );
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
$map: (
|
||||
small: 767px,
|
||||
medium: 992px,
|
||||
|
@ -426,9 +485,15 @@ $map: (
|
|||
large: 1200px,
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`selector_list.css - css-verify 1`] = `
|
||||
exports[`selector_list.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm,
|
||||
asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, {
|
||||
|
||||
|
@ -439,7 +504,8 @@ asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsj
|
|||
color: red;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm,
|
||||
asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm {
|
||||
}
|
||||
|
@ -450,9 +516,16 @@ asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsj
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`selector_list.css - scss-verify 1`] = `
|
||||
exports[`selector_list.css 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
trailingComma: "es5"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm,
|
||||
asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm, {
|
||||
|
||||
|
@ -463,7 +536,8 @@ asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsj
|
|||
color: red;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm,
|
||||
asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsjkdjkakjsdm {
|
||||
}
|
||||
|
@ -474,24 +548,40 @@ asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkasdhkajsdhakjsdhkajsdhjkahskjdkjahsj
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`variable.css - css-verify 1`] = `
|
||||
exports[`variable.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$test: 1,;
|
||||
$margin: 0, 2em, 0, 1.5em,;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
$test: 1;
|
||||
$margin: 0, 2em, 0, 1.5em;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`variable.css - scss-verify 1`] = `
|
||||
exports[`variable.css 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["scss"]
|
||||
printWidth: 80
|
||||
trailingComma: "es5"
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
$test: 1,;
|
||||
$margin: 0, 2em, 0, 1.5em,;
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
$test: 1;
|
||||
$margin: 0, 2em, 0, 1.5em;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`variables.css - css-verify 1`] = `
|
||||
exports[`variables.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
--prop: 10px;
|
||||
prop1: var(--prop);
|
||||
|
@ -13,7 +18,8 @@ exports[`variables.css - css-verify 1`] = `
|
|||
color: var(--varName);
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
--prop: 10px;
|
||||
prop1: var(--prop);
|
||||
|
@ -27,23 +33,15 @@ exports[`variables.css - css-verify 1`] = `
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`variables.scss - css-verify 1`] = `
|
||||
.foo {
|
||||
--#{$prop}: 10px;
|
||||
#{$prop}: 10px;
|
||||
prop1: var(--#{$var});
|
||||
prop2: var(#{$var}, --my-#{$var}, pink);
|
||||
prop3: calc(var(--#{$var}) * 1px);
|
||||
}
|
||||
|
||||
@supports (--#{$prop}: green) {
|
||||
body {
|
||||
color: var(--#{$var});
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`variables.scss 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
--#{$prop}: 10px;
|
||||
#{$prop}: 10px;
|
||||
|
@ -58,4 +56,20 @@ exports[`variables.scss - css-verify 1`] = `
|
|||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
--#{$prop}: 10px;
|
||||
#{$prop}: 10px;
|
||||
prop1: var(--#{$var});
|
||||
prop2: var(#{$var}, --my-#{$var}, pink);
|
||||
prop3: calc(var(--#{$var}) * 1px);
|
||||
}
|
||||
|
||||
@supports (--#{$prop}: green) {
|
||||
body {
|
||||
color: var(--#{$var});
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`comment_after.css - css-verify 1`] = `
|
||||
exports[`comment_after.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
|
@ -8,7 +13,8 @@ description: Description
|
|||
/* comment */
|
||||
.something {
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
|
@ -18,9 +24,15 @@ description: Description
|
|||
.something {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`dirty.css - css-verify 1`] = `
|
||||
exports[`dirty.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
hello: world
|
||||
a:
|
||||
|
@ -33,7 +45,8 @@ a:
|
|||
|
||||
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
---
|
||||
hello: world
|
||||
a:
|
||||
|
@ -44,16 +57,23 @@ a:
|
|||
.class {
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`empty.css - css-verify 1`] = `
|
||||
exports[`empty.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
---
|
||||
|
||||
a {
|
||||
color: red;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
---
|
||||
---
|
||||
|
||||
|
@ -61,9 +81,15 @@ a {
|
|||
color: red;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`empty_newlines.css - css-verify 1`] = `
|
||||
exports[`empty_newlines.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
|
||||
|
||||
|
@ -75,7 +101,8 @@ exports[`empty_newlines.css - css-verify 1`] = `
|
|||
a {
|
||||
color: red;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
---
|
||||
---
|
||||
|
||||
|
@ -83,16 +110,15 @@ a {
|
|||
color: red;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`ignore.css - css-verify 1`] = `
|
||||
---
|
||||
hello: world
|
||||
---
|
||||
|
||||
/* prettier-ignore */
|
||||
.foo {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`ignore.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
hello: world
|
||||
---
|
||||
|
@ -100,23 +126,44 @@ hello: world
|
|||
/* prettier-ignore */
|
||||
.foo {}
|
||||
|
||||
=====================================output=====================================
|
||||
---
|
||||
hello: world
|
||||
---
|
||||
|
||||
/* prettier-ignore */
|
||||
.foo {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`malformed.css - css-verify 1`] = `
|
||||
exports[`malformed.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
aaa
|
||||
b---
|
||||
|
||||
a {
|
||||
color: red;
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
--- aaa b--- a {
|
||||
color: red;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`malformed-2.css - css-verify 1`] = `
|
||||
exports[`malformed-2.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
foo: bar
|
||||
---
|
||||
|
@ -129,7 +176,8 @@ color:blue
|
|||
|
||||
.b {
|
||||
color:red
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
---
|
||||
foo: bar
|
||||
---
|
||||
|
@ -142,9 +190,15 @@ a {
|
|||
color: red;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`only_comments.css - css-verify 1`] = `
|
||||
exports[`only_comments.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
# comment 1
|
||||
# comment 2
|
||||
|
@ -154,7 +208,8 @@ exports[`only_comments.css - css-verify 1`] = `
|
|||
a {
|
||||
color: red;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
---
|
||||
# comment 1
|
||||
# comment 2
|
||||
|
@ -165,9 +220,15 @@ a {
|
|||
color: red;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`with_comments.css - css-verify 1`] = `
|
||||
exports[`with_comments.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
|
@ -176,7 +237,8 @@ description: Description
|
|||
|
||||
a {
|
||||
color: red;
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
|
@ -187,9 +249,15 @@ a {
|
|||
color: red;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`without-newline-after.css - css-verify 1`] = `
|
||||
exports[`without-newline-after.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
|
@ -197,7 +265,8 @@ description: Description
|
|||
a {
|
||||
color: red;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
|
@ -207,9 +276,15 @@ a {
|
|||
color: red;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`yaml.css - css-verify 1`] = `
|
||||
exports[`yaml.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
|
@ -218,7 +293,8 @@ description: Description
|
|||
a {
|
||||
color: red;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
|
@ -228,18 +304,15 @@ a {
|
|||
color: red;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`yaml.less - css-verify 1`] = `
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
---
|
||||
|
||||
a {
|
||||
color: red;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`yaml.less 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
|
@ -249,18 +322,25 @@ a {
|
|||
color: red;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
---
|
||||
|
||||
a {
|
||||
color: red;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`yaml.scss - css-verify 1`] = `
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
---
|
||||
|
||||
a {
|
||||
color: red;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`yaml.scss 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
|
@ -270,4 +350,15 @@ a {
|
|||
color: red;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
---
|
||||
title: Title
|
||||
description: Description
|
||||
---
|
||||
|
||||
a {
|
||||
color: red;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,92 +1,153 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`comments-1.js - babylon-verify 1`] = `
|
||||
exports[`comments-1.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// hi l<|>ol
|
||||
function ehllooo () {
|
||||
const hi = "hi"
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// hi l<|>ol
|
||||
function ehllooo() {
|
||||
const hi = "hi";
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`comments-2.js - babylon-verify 1`] = `
|
||||
exports[`comments-2.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
<|>
|
||||
// howdy
|
||||
// hi lol
|
||||
const y = 5
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
<|>// howdy
|
||||
// hi lol
|
||||
const y = 5;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`comments-3.js - babylon-verify 1`] = `
|
||||
exports[`comments-3.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/<|>/ howdy
|
||||
// hi lol
|
||||
const y = 5
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/<|>/ howdy
|
||||
// hi lol
|
||||
const y = 5;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`comments-4.js - babylon-verify 1`] = `
|
||||
exports[`comments-4.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// howdy
|
||||
// hi lol
|
||||
const y = 5
|
||||
// traling! <|>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// howdy
|
||||
// hi lol
|
||||
const y = 5;
|
||||
// traling!<|>
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`cursor-0.js - babylon-verify 1`] = `
|
||||
exports[`cursor-0.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
(function() {return <|> 15})()
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
(function() {
|
||||
return <|>15;
|
||||
})();
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`cursor-1.js - babylon-verify 1`] = `
|
||||
exports[`cursor-1.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
(function(){return <|>15})()
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
(function() {
|
||||
return <|>15;
|
||||
})();
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`cursor-2.js - babylon-verify 1`] = `
|
||||
exports[`cursor-2.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
foo <|> (bar);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
foo<|>(bar);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`cursor-3.js - babylon-verify 1`] = `
|
||||
exports[`cursor-3.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
|
||||
<|>
|
||||
|
||||
const y = 5
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
<|>const y = 5;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`cursor-4.js - babylon-verify 1`] = `
|
||||
exports[`cursor-4.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
|
||||
const y = 5
|
||||
|
@ -94,152 +155,245 @@ exports[`cursor-4.js - babylon-verify 1`] = `
|
|||
<|>
|
||||
|
||||
const z = 9
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const y = 5;
|
||||
|
||||
<|>const z = 9;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`cursor-5.js - babylon-verify 1`] = `
|
||||
exports[`cursor-5.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const /* h<|>i */ y = 5
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const /* h<|>i */ y = 5;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`cursor-6.js - babylon-verify 1`] = `
|
||||
exports[`cursor-6.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const y /* h<|>i */ = 5
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const y /* h<|>i */ = 5;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`cursor-7.js - babylon-verify 1`] = `
|
||||
exports[`cursor-7.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const y = 5
|
||||
<|>
|
||||
|
||||
const z = 9
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const y = 5;
|
||||
<|>
|
||||
const z = 9;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`cursor-8.js - babylon-verify 1`] = `
|
||||
func<|>tion banana(){}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`cursor-8.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
func<|>tion banana(){}
|
||||
=====================================output=====================================
|
||||
func<|>tion banana() {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`cursor-9.js - babylon-verify 1`] = `
|
||||
thisWillBeFormatted <|> (2 ,3, )~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`cursor-9.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
thisWillBeFormatted <|> (2 ,3, )
|
||||
=====================================output=====================================
|
||||
thisWillBeFormatted<|>(2, 3);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`cursor-10.js - babylon-verify 1`] = `
|
||||
exports[`cursor-10.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const y = 5
|
||||
|
||||
|
||||
|
||||
|
||||
<|>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const y = 5;
|
||||
<|>
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`file-start-with-comment-1.js - babylon-verify 1`] = `
|
||||
exports[`file-start-with-comment-1.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// hi<|> lol
|
||||
haha()
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// hi<|> lol
|
||||
haha();
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`file-start-with-comment-2.js - babylon-verify 1`] = `
|
||||
exports[`file-start-with-comment-2.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// hi lol
|
||||
haha()<|>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// hi lol
|
||||
haha()<|>;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`range-0.js - babylon-verify 1`] = `
|
||||
exports[`range-0.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
thisWontBeFormatted ( 1 ,3)
|
||||
|
||||
thisWillBeFormatted <|> (2 ,3, )
|
||||
|
||||
thisWontBeFormatted (2, 90 ,)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
thisWontBeFormatted ( 1 ,3)
|
||||
|
||||
thisWillBeFormatted<|>(2, 3);
|
||||
|
||||
thisWontBeFormatted (2, 90 ,)
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`range-1.js - babylon-verify 1`] = `
|
||||
exports[`range-1.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
thisWontBeFormatted ( 1 ,3)
|
||||
|
||||
thisWillBeFormatted (2 ,3<|>, )
|
||||
|
||||
thisWontBeFormatted (2, 90 ,)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
thisWontBeFormatted ( 1 ,3)
|
||||
|
||||
thisWillBeFormatted(2, 3<|>);
|
||||
|
||||
thisWontBeFormatted (2, 90 ,)
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`range-2.js - babylon-verify 1`] = `
|
||||
exports[`range-2.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
thisWontBeFormatted ( 1 ,3)
|
||||
|
||||
thisWillBeFormatted (2 ,3, <|> )
|
||||
|
||||
thisWontBeFormatted (2, 90 ,)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
thisWontBeFormatted ( 1 ,3)
|
||||
|
||||
thisWillBeFormatted(2, 3<|>);
|
||||
|
||||
thisWontBeFormatted (2, 90 ,)
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`range-3.js - babylon-verify 1`] = `
|
||||
exports[`range-3.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
thisWontBeFormatted <|> ( 1 ,3)
|
||||
|
||||
thisWillBeFormatted (2 ,3, )
|
||||
|
||||
thisWontBeFormatted (2, 90 ,)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
thisWontBeFormatted <|> ( 1 ,3)
|
||||
|
||||
thisWillBeFormatted(2, 3);
|
||||
|
||||
thisWontBeFormatted (2, 90 ,)
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`range-4.js - babylon-verify 1`] = `
|
||||
exports[`range-4.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript", "flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
thisWontBeFormatted ( 1 ,3)
|
||||
|
||||
thisWillBeFormatted (2 ,3, )
|
||||
|
||||
thisWontBeFormatted (2, 9<|>0 ,)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
thisWontBeFormatted ( 1 ,3)
|
||||
|
||||
thisWillBeFormatted(2, 3);
|
||||
|
||||
thisWontBeFormatted (2, 9<|>0 ,)
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`test.css - css-verify 1`] = `
|
||||
.blah {
|
||||
/* hloow <|> */
|
||||
background-color: white;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`test.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.blah {
|
||||
/* hloow <|> */
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
.blah {
|
||||
/* hloow <|> */
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,16 +1,23 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`comments.js - babylon-verify 1`] = `
|
||||
exports[`comments.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class Something {
|
||||
@Annotateme()
|
||||
// comment
|
||||
static property: Array<string>;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class Something {
|
||||
@Annotateme()
|
||||
// comment
|
||||
static property: Array<string>;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,25 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`accessor-decorator.ts - typescript-verify 1`] = `
|
||||
class Point {
|
||||
private _x: number;
|
||||
private _y: number;
|
||||
constructor(x: number, y: number) {
|
||||
this._x = x;
|
||||
this._y = y;
|
||||
}
|
||||
|
||||
@configurable(false)
|
||||
get x() {
|
||||
return this._x;
|
||||
}
|
||||
|
||||
@configurable(false)
|
||||
get y() {
|
||||
return this._y;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`accessor-decorator.ts 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class Point {
|
||||
private _x: number;
|
||||
private _y: number;
|
||||
|
@ -39,9 +25,35 @@ class Point {
|
|||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
class Point {
|
||||
private _x: number;
|
||||
private _y: number;
|
||||
constructor(x: number, y: number) {
|
||||
this._x = x;
|
||||
this._y = y;
|
||||
}
|
||||
|
||||
@configurable(false)
|
||||
get x() {
|
||||
return this._x;
|
||||
}
|
||||
|
||||
@configurable(false)
|
||||
get y() {
|
||||
return this._y;
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`angular.ts - typescript-verify 1`] = `
|
||||
exports[`angular.ts 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@Component({
|
||||
selector: 'toh-hero-button',
|
||||
template: \`<button>{{label}}</button>\`
|
||||
|
@ -50,7 +62,8 @@ export class HeroButtonComponent {
|
|||
@Output() change = new EventEmitter<any>();
|
||||
@Input() label: string;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@Component({
|
||||
selector: "toh-hero-button",
|
||||
template: \`
|
||||
|
@ -62,20 +75,15 @@ export class HeroButtonComponent {
|
|||
@Input() label: string;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`class-decorator.ts - typescript-verify 1`] = `
|
||||
@sealed
|
||||
class Greeter {
|
||||
greeting: string;
|
||||
constructor(message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
greet() {
|
||||
return "Hello, " + this.greeting;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`class-decorator.ts 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@sealed
|
||||
class Greeter {
|
||||
greeting: string;
|
||||
|
@ -87,21 +95,27 @@ class Greeter {
|
|||
}
|
||||
}
|
||||
|
||||
`;
|
||||
|
||||
exports[`method-decorator.ts - typescript-verify 1`] = `
|
||||
=====================================output=====================================
|
||||
@sealed
|
||||
class Greeter {
|
||||
greeting: string;
|
||||
constructor(message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
|
||||
@enumerable(false)
|
||||
greet() {
|
||||
return "Hello, " + this.greeting;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`method-decorator.ts 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class Greeter {
|
||||
greeting: string;
|
||||
constructor(message: string) {
|
||||
|
@ -114,9 +128,28 @@ class Greeter {
|
|||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
class Greeter {
|
||||
greeting: string;
|
||||
constructor(message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
|
||||
@enumerable(false)
|
||||
greet() {
|
||||
return "Hello, " + this.greeting;
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`mobx.ts - typescript-verify 1`] = `
|
||||
exports[`mobx.ts 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class X {
|
||||
@deco x() {
|
||||
return this.count * 2;
|
||||
|
@ -125,7 +158,8 @@ class X {
|
|||
return this.count * 2;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class X {
|
||||
@deco x() {
|
||||
return this.count * 2;
|
||||
|
@ -135,42 +169,37 @@ class X {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`multiple.ts - typescript-verify 1`] = `
|
||||
class C {
|
||||
@f()
|
||||
@g()
|
||||
method() {}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`multiple.ts 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class C {
|
||||
@f()
|
||||
@g()
|
||||
method() {}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
class C {
|
||||
@f()
|
||||
@g()
|
||||
method() {}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`parameter-decorator.ts - typescript-verify 1`] = `
|
||||
class Greeter {
|
||||
greeting: string;
|
||||
|
||||
constructor(message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
|
||||
@validate
|
||||
greet(@required name: string) {
|
||||
return "Hello " + name + ", " + this.greeting;
|
||||
}
|
||||
|
||||
@validate
|
||||
destructured(@required { toString }: Object) {
|
||||
return Function.prototype.toString.apply(toString);
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`parameter-decorator.ts 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class Greeter {
|
||||
greeting: string;
|
||||
|
||||
|
@ -189,21 +218,34 @@ class Greeter {
|
|||
}
|
||||
}
|
||||
|
||||
`;
|
||||
|
||||
exports[`property-decorator.ts - typescript-verify 1`] = `
|
||||
=====================================output=====================================
|
||||
class Greeter {
|
||||
@format("Hello, %s") greeting: string;
|
||||
greeting: string;
|
||||
|
||||
constructor(message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
greet() {
|
||||
let formatString = getFormat(this, "greeting");
|
||||
return formatString.replace("%s", this.greeting);
|
||||
|
||||
@validate
|
||||
greet(@required name: string) {
|
||||
return "Hello " + name + ", " + this.greeting;
|
||||
}
|
||||
|
||||
@validate
|
||||
destructured(@required { toString }: Object) {
|
||||
return Function.prototype.toString.apply(toString);
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`property-decorator.ts 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class Greeter {
|
||||
@format("Hello, %s") greeting: string;
|
||||
|
||||
|
@ -216,9 +258,28 @@ class Greeter {
|
|||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
class Greeter {
|
||||
@format("Hello, %s") greeting: string;
|
||||
|
||||
constructor(message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
greet() {
|
||||
let formatString = getFormat(this, "greeting");
|
||||
return formatString.replace("%s", this.greeting);
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`typeorm.ts - typescript-verify 1`] = `
|
||||
exports[`typeorm.ts 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@Entity()
|
||||
export class Board {
|
||||
|
||||
|
@ -241,7 +302,8 @@ export class Board {
|
|||
topics: Topic[]
|
||||
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@Entity()
|
||||
export class Board {
|
||||
@PrimaryGeneratedColumn()
|
||||
|
@ -263,4 +325,5 @@ export class Board {
|
|||
topics: Topic[];
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`classes.js - babylon-verify 1`] = `
|
||||
exports[`classes.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@deco class Foo {}
|
||||
|
||||
@deco export class Bar {}
|
||||
|
@ -16,7 +21,8 @@ const foo =
|
|||
class {
|
||||
//
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@deco
|
||||
class Foo {}
|
||||
|
||||
|
@ -38,9 +44,15 @@ const foo =
|
|||
//
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`comments.js - babylon-verify 1`] = `
|
||||
exports[`comments.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
var x = 100
|
||||
|
||||
@Hello({
|
||||
|
@ -72,7 +84,8 @@ export class AppModule {}
|
|||
@Bar()
|
||||
// C
|
||||
export class Bar{}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
var x = 100;
|
||||
|
||||
@Hello({
|
||||
|
@ -102,9 +115,15 @@ export class AppModule {}
|
|||
// C
|
||||
export class Bar {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`methods.js - babylon-verify 1`] = `
|
||||
exports[`methods.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
class Yo {
|
||||
@foo("hello")
|
||||
|
@ -115,7 +134,8 @@ class Yo {
|
|||
|
||||
@anotherDecoratorWithALongName("another very long string, but now inline") async plip() {}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class Yo {
|
||||
@foo("hello")
|
||||
async plop() {}
|
||||
|
@ -127,9 +147,15 @@ class Yo {
|
|||
async plip() {}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`mobx.js - babylon-verify 1`] = `
|
||||
exports[`mobx.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
import {observable} from "mobx";
|
||||
|
||||
@observer class OrderLine {
|
||||
|
@ -166,7 +192,8 @@ import {observable} from "mobx";
|
|||
|
||||
@action handleSomething = (event: React.ChangeEvent<HTMLInputElement>) => doSomething();
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
import { observable } from "mobx";
|
||||
|
||||
@observer
|
||||
|
@ -214,24 +241,37 @@ class OrderLine {
|
|||
doSomething();
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`multiline.js - babylon-verify 1`] = `
|
||||
exports[`multiline.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class Foo {
|
||||
@deco([
|
||||
foo,
|
||||
bar
|
||||
]) prop = value;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class Foo {
|
||||
@deco([foo, bar])
|
||||
prop = value;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`multiple.js - babylon-verify 1`] = `
|
||||
exports[`multiple.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const dog = {
|
||||
@readonly
|
||||
@nonenumerable
|
||||
|
@ -247,7 +287,8 @@ const dog = {
|
|||
const foo = {
|
||||
@multipleDecorators @inline @theyWontAllFitInOneline aVeryLongPropName: "A very long string as value"
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const dog = {
|
||||
@readonly
|
||||
@nonenumerable
|
||||
|
@ -267,15 +308,22 @@ const foo = {
|
|||
aVeryLongPropName: "A very long string as value"
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`redux.js - babylon-verify 1`] = `
|
||||
exports[`redux.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@connect(mapStateToProps, mapDispatchToProps)
|
||||
export class MyApp extends React.Component {}
|
||||
|
||||
@connect(state => ({ todos: state.todos }))
|
||||
export class Home extends React.Component {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
@connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
|
@ -285,4 +333,5 @@ export class MyApp extends React.Component {}
|
|||
@connect(state => ({ todos: state.todos }))
|
||||
export class Home extends React.Component {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`after_export.js - babylon-verify 1`] = `
|
||||
exports[`after_export.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export @decorator class Foo {}
|
||||
|
||||
export default @decorator class {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export
|
||||
@decorator
|
||||
class Foo {}
|
||||
|
@ -13,19 +19,27 @@ export default
|
|||
@decorator
|
||||
class {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`before_export.js - babylon-verify 1`] = `
|
||||
@decorator
|
||||
export class Foo {}
|
||||
|
||||
@decorator
|
||||
export default class {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`before_export.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
@decorator
|
||||
export class Foo {}
|
||||
|
||||
@decorator
|
||||
export default class {}
|
||||
|
||||
=====================================output=====================================
|
||||
@decorator
|
||||
export class Foo {}
|
||||
|
||||
@decorator
|
||||
export default class {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`destructuring.js - flow-verify 1`] = `
|
||||
exports[`destructuring.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const [one, two = null, three = null] = arr;
|
||||
a = ([s=1,]) => 1
|
||||
const { children, ...props } = this.props
|
||||
|
@ -34,7 +39,8 @@ try {
|
|||
} catch ({ data: { message: { errors }}}) {
|
||||
// code
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const [one, two = null, three = null] = arr;
|
||||
a = ([s = 1]) => 1;
|
||||
const { children, ...props } = this.props;
|
||||
|
@ -84,4 +90,5 @@ try {
|
|||
// code
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`escaped.js - flow-verify 1`] = `
|
||||
exports[`escaped.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Unnecessary escapes. (adapted from tests/quotes/strings.js)
|
||||
// Note that in directives, unnecessary escapes should be preserved.
|
||||
// See https://github.com/prettier/prettier/issues/1555
|
||||
|
@ -36,7 +41,8 @@ exports[`escaped.js - flow-verify 1`] = `
|
|||
'
|
||||
'escaped \\u2028 \\
'
|
||||
'escaped \\u2029 \\
'
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// Unnecessary escapes. (adapted from tests/quotes/strings.js)
|
||||
// Note that in directives, unnecessary escapes should be preserved.
|
||||
// See https://github.com/prettier/prettier/issues/1555
|
||||
|
@ -73,38 +79,57 @@ exports[`escaped.js - flow-verify 1`] = `
|
|||
"escaped \\u2028 \\
";
|
||||
"escaped \\u2029 \\
";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`last-line-0.js - flow-verify 1`] = `
|
||||
'use strict';~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
"use strict";
|
||||
|
||||
`;
|
||||
|
||||
exports[`last-line-1.js - flow-verify 1`] = `
|
||||
exports[`last-line-0.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
'use strict';
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
=====================================output=====================================
|
||||
"use strict";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`last-line-2.js - flow-verify 1`] = `
|
||||
exports[`last-line-1.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
'use strict';
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
=====================================output=====================================
|
||||
"use strict";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`newline.js - flow-verify 1`] = `
|
||||
/* @flow */
|
||||
exports[`last-line-2.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
'use strict';
|
||||
|
||||
|
||||
=====================================output=====================================
|
||||
"use strict";
|
||||
|
||||
import a from "a";
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
a();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`newline.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/* @flow */
|
||||
|
||||
"use strict";
|
||||
|
@ -113,18 +138,40 @@ import a from "a";
|
|||
|
||||
a();
|
||||
|
||||
=====================================output=====================================
|
||||
/* @flow */
|
||||
|
||||
"use strict";
|
||||
|
||||
import a from "a";
|
||||
|
||||
a();
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`no-newline.js - flow-verify 1`] = `
|
||||
exports[`no-newline.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
"use strict";
|
||||
a
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
"use strict";
|
||||
a;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`test.js - flow-verify 1`] = `
|
||||
exports[`test.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
"use strict";
|
||||
|
||||
function fn() {
|
||||
|
@ -150,7 +197,8 @@ function f() {
|
|||
|
||||
Object.assign(this, { $log, $uibModal });
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
"use strict";
|
||||
|
||||
function fn() {
|
||||
|
@ -174,4 +222,5 @@ function f() {
|
|||
Object.assign(this, { $log, $uibModal });
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`do.js - babylon-verify 1`] = `
|
||||
exports[`do.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
const envSpecific = {
|
||||
domain:
|
||||
do {
|
||||
|
@ -55,7 +60,8 @@ function foo() {
|
|||
obj[key];
|
||||
}
|
||||
};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
const envSpecific = {
|
||||
domain: do {
|
||||
if (env === "production") "https://abc.mno.com/";
|
||||
|
@ -114,4 +120,5 @@ function foo() {
|
|||
}
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`test.js - flow-verify 1`] = `
|
||||
exports[`test.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
import("module.js");
|
||||
import("module.js").then((a) => a);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
import("module.js");
|
||||
import("module.js").then(a => a);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,24 +1,52 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`empty - flow-verify 1`] = `
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`empty 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript", "css", "less", "scss", "json", "json5", "json-stringify", "graphql", "markdown", "mdx", "vue", "yaml", "html", "angular"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
=====================================output=====================================
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`newline - flow-verify 1`] = `
|
||||
exports[`newline 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript", "css", "less", "scss", "json", "json5", "json-stringify", "graphql", "markdown", "mdx", "vue", "yaml", "html", "angular"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`space - flow-verify 1`] = `
|
||||
exports[`space 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript", "css", "less", "scss", "json", "json5", "json-stringify", "graphql", "markdown", "mdx", "vue", "yaml", "html", "angular"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`space-newline - flow-verify 1`] = `
|
||||
exports[`space-newline 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript", "css", "less", "scss", "json", "json5", "json-stringify", "graphql", "markdown", "mdx", "vue", "yaml", "html", "angular"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`class.js - flow-verify 1`] = `
|
||||
exports[`class.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class x {
|
||||
/**
|
||||
* Set of default settings to be applied to model fetch calls in DAO layer.
|
||||
|
@ -8,7 +13,8 @@ class x {
|
|||
static get defaultSettings() {
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class x {
|
||||
/**
|
||||
* Set of default settings to be applied to model fetch calls in DAO layer.
|
||||
|
@ -16,9 +22,15 @@ class x {
|
|||
static get defaultSettings() {}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`empty_paren_comment.js - flow-verify 1`] = `
|
||||
exports[`empty_paren_comment.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
let f = (/* ... */) => {}
|
||||
(function (/* ... */) {})(/* ... */)
|
||||
function f(/* ... */) {}
|
||||
|
@ -47,7 +59,8 @@ f(/* ... */ a, b);
|
|||
|
||||
let f = () => import(a /* ... */);
|
||||
let f = () => doThing(a, /* ... */ b);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
let f = (/* ... */) => {};
|
||||
(function(/* ... */) {})(/* ... */);
|
||||
function f(/* ... */) {}
|
||||
|
@ -77,4 +90,5 @@ f(/* ... */ a, b);
|
|||
let f = () => import(a /* ... */);
|
||||
let f = () => doThing(a, /* ... */ b);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`body.js - flow-verify 1`] = `
|
||||
exports[`body.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
with (a);
|
||||
if (1); else if (2); else;
|
||||
for (;;);
|
||||
|
@ -8,7 +13,8 @@ while (1);
|
|||
for (var i in o);
|
||||
for (var i of o);
|
||||
do; while(1);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
with (a);
|
||||
if (1);
|
||||
else if (2);
|
||||
|
@ -20,18 +26,26 @@ for (var i of o);
|
|||
do;
|
||||
while (1);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`no-newline.js - flow-verify 1`] = `
|
||||
exports[`no-newline.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
if (a) {
|
||||
b;
|
||||
|
||||
|
||||
;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
if (a) {
|
||||
b;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,83 +1,145 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`usingCrlf.js - babylon-verify 1`] = `
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`usingCrlf.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingCrlf.js - babylon-verify 2`] = `
|
||||
exports[`usingCrlf.js 2`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "cr"
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function f() {/*CR*/ console.log("testing line endings");/*CR*/}/*CR*/
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingCrlf.js - babylon-verify 3`] = `
|
||||
exports[`usingCrlf.js 3`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "crlf"
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function f() {/*CR*/
|
||||
console.log("testing line endings");/*CR*/
|
||||
}/*CR*/
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingCrlf.js - babylon-verify 4`] = `
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`usingCrlf.js 4`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "lf"
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingLf.js - babylon-verify 1`] = `
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`usingLf.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingLf.js - babylon-verify 2`] = `
|
||||
exports[`usingLf.js 2`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "cr"
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function f() {/*CR*/ console.log("testing line endings");/*CR*/}/*CR*/
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingLf.js - babylon-verify 3`] = `
|
||||
exports[`usingLf.js 3`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "crlf"
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function f() {/*CR*/
|
||||
console.log("testing line endings");/*CR*/
|
||||
}/*CR*/
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingLf.js - babylon-verify 4`] = `
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`usingLf.js 4`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "lf"
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
function f() {
|
||||
console.log("testing line endings");
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,75 +1,137 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`usingCrlf.css - css-verify 1`] = `
|
||||
exports[`usingCrlf.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
margin: 42px;
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
margin: 42px;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingCrlf.css - css-verify 2`] = `
|
||||
exports[`usingCrlf.css 2`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "cr"
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
margin: 42px;
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
.foo {/*CR*/ margin: 42px;/*CR*/}/*CR*/
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingCrlf.css - css-verify 3`] = `
|
||||
exports[`usingCrlf.css 3`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "crlf"
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
margin: 42px;
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
.foo {/*CR*/
|
||||
margin: 42px;/*CR*/
|
||||
}/*CR*/
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingCrlf.css - css-verify 4`] = `
|
||||
exports[`usingCrlf.css 4`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "lf"
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
margin: 42px;
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
margin: 42px;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingLf.css - css-verify 1`] = `
|
||||
exports[`usingLf.css 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
margin: 42px;
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
margin: 42px;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingLf.css - css-verify 2`] = `
|
||||
exports[`usingLf.css 2`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "cr"
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
margin: 42px;
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
.foo {/*CR*/ margin: 42px;/*CR*/}/*CR*/
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingLf.css - css-verify 3`] = `
|
||||
exports[`usingLf.css 3`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "crlf"
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
margin: 42px;
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
.foo {/*CR*/
|
||||
margin: 42px;/*CR*/
|
||||
}/*CR*/
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingLf.css - css-verify 4`] = `
|
||||
exports[`usingLf.css 4`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "lf"
|
||||
parsers: ["css"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
.foo {
|
||||
margin: 42px;
|
||||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
}
|
||||
=====================================output=====================================
|
||||
.foo {
|
||||
margin: 42px;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,75 +1,137 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`usingCrlf.md - markdown-verify 1`] = `
|
||||
exports[`usingCrlf.md 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
# Markdown file
|
||||
|
||||
testing line endings~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
testing line endings
|
||||
=====================================output=====================================
|
||||
# Markdown file
|
||||
|
||||
testing line endings
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingCrlf.md - markdown-verify 2`] = `
|
||||
exports[`usingCrlf.md 2`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "cr"
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
# Markdown file
|
||||
|
||||
testing line endings~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
testing line endings
|
||||
=====================================output=====================================
|
||||
# Markdown file/*CR*//*CR*/testing line endings/*CR*/
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingCrlf.md - markdown-verify 3`] = `
|
||||
exports[`usingCrlf.md 3`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "crlf"
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
# Markdown file
|
||||
|
||||
testing line endings~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
testing line endings
|
||||
=====================================output=====================================
|
||||
# Markdown file/*CR*/
|
||||
/*CR*/
|
||||
testing line endings/*CR*/
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingCrlf.md - markdown-verify 4`] = `
|
||||
exports[`usingCrlf.md 4`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "lf"
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
# Markdown file
|
||||
|
||||
testing line endings~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
testing line endings
|
||||
=====================================output=====================================
|
||||
# Markdown file
|
||||
|
||||
testing line endings
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingLf.md - markdown-verify 1`] = `
|
||||
exports[`usingLf.md 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
# Markdown file
|
||||
|
||||
testing line endings~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
testing line endings
|
||||
=====================================output=====================================
|
||||
# Markdown file
|
||||
|
||||
testing line endings
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingLf.md - markdown-verify 2`] = `
|
||||
exports[`usingLf.md 2`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "cr"
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
# Markdown file
|
||||
|
||||
testing line endings~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
testing line endings
|
||||
=====================================output=====================================
|
||||
# Markdown file/*CR*//*CR*/testing line endings/*CR*/
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingLf.md - markdown-verify 3`] = `
|
||||
exports[`usingLf.md 3`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "crlf"
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
# Markdown file
|
||||
|
||||
testing line endings~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
testing line endings
|
||||
=====================================output=====================================
|
||||
# Markdown file/*CR*/
|
||||
/*CR*/
|
||||
testing line endings/*CR*/
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`usingLf.md - markdown-verify 4`] = `
|
||||
exports[`usingLf.md 4`] = `
|
||||
====================================options=====================================
|
||||
endOfLine: "lf"
|
||||
parsers: ["markdown"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
# Markdown file
|
||||
|
||||
testing line endings~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
testing line endings
|
||||
=====================================output=====================================
|
||||
# Markdown file
|
||||
|
||||
testing line endings
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,141 +1,281 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`export_default_arrow_expression.js - babylon-verify 1`] = `
|
||||
export default () => {};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`export_default_arrow_expression.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default () => {};
|
||||
|
||||
=====================================output=====================================
|
||||
export default () => {};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_arrow_expression.js - flow-verify 1`] = `
|
||||
export default () => {};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`export_default_arrow_expression.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default () => {};
|
||||
|
||||
=====================================output=====================================
|
||||
export default () => {};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_call_expression.js - babylon-verify 1`] = `
|
||||
exports[`export_default_call_expression.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default foo()
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export default foo();
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_call_expression.js - flow-verify 1`] = `
|
||||
exports[`export_default_call_expression.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default foo()
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export default foo();
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_class_declaration.js - babylon-verify 1`] = `
|
||||
export default class Foo {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`export_default_class_declaration.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default class Foo {}
|
||||
|
||||
=====================================output=====================================
|
||||
export default class Foo {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_class_declaration.js - flow-verify 1`] = `
|
||||
export default class Foo {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`export_default_class_declaration.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default class Foo {}
|
||||
|
||||
=====================================output=====================================
|
||||
export default class Foo {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_class_expression.js - babylon-verify 1`] = `
|
||||
exports[`export_default_class_expression.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default (class foobar {})
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export default (class foobar {});
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_class_expression.js - flow-verify 1`] = `
|
||||
exports[`export_default_class_expression.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default (class foobar {})
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export default (class foobar {});
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_function_declaration.js - babylon-verify 1`] = `
|
||||
export default function() {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`export_default_function_declaration.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default function() {}
|
||||
|
||||
`;
|
||||
|
||||
exports[`export_default_function_declaration.js - flow-verify 1`] = `
|
||||
export default function() {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
=====================================output=====================================
|
||||
export default function() {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_function_declaration_async.js - babylon-verify 1`] = `
|
||||
export default async function foo() {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export default async function foo() {}
|
||||
exports[`export_default_function_declaration.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default function() {}
|
||||
|
||||
=====================================output=====================================
|
||||
export default function() {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_function_declaration_async.js - flow-verify 1`] = `
|
||||
export default async function foo() {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`export_default_function_declaration_async.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default async function foo() {}
|
||||
|
||||
=====================================output=====================================
|
||||
export default async function foo() {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_function_declaration_named.js - babylon-verify 1`] = `
|
||||
exports[`export_default_function_declaration_async.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default async function foo() {}
|
||||
|
||||
=====================================output=====================================
|
||||
export default async function foo() {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_function_declaration_named.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default function f(){}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export default function f() {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_function_declaration_named.js - flow-verify 1`] = `
|
||||
exports[`export_default_function_declaration_named.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default function f(){}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export default function f() {}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_function_expression.js - babylon-verify 1`] = `
|
||||
export default (function() {});
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`export_default_function_expression.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default (function() {});
|
||||
|
||||
=====================================output=====================================
|
||||
export default (function() {});
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_function_expression.js - flow-verify 1`] = `
|
||||
export default (function() {});
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`export_default_function_expression.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default (function() {});
|
||||
|
||||
=====================================output=====================================
|
||||
export default (function() {});
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_function_expression_named.js - babylon-verify 1`] = `
|
||||
exports[`export_default_function_expression_named.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default (function f(){})
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export default (function f() {});
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_function_expression_named.js - flow-verify 1`] = `
|
||||
exports[`export_default_function_expression_named.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default (function f(){})
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export default (function f() {});
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_new_expression.js - babylon-verify 1`] = `
|
||||
export default new Foo();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`export_default_new_expression.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default new Foo();
|
||||
|
||||
=====================================output=====================================
|
||||
export default new Foo();
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`export_default_new_expression.js - flow-verify 1`] = `
|
||||
export default new Foo();
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`export_default_new_expression.js 2`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default new Foo();
|
||||
|
||||
=====================================output=====================================
|
||||
export default new Foo();
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`test.js - flow-verify 1`] = `
|
||||
type Props = {||};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`test.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
type Props = {||};
|
||||
|
||||
=====================================output=====================================
|
||||
type Props = {||};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`bracket.js - flow-verify 1`] = `
|
||||
exports[`bracket.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export {
|
||||
runTaskForChanged,
|
||||
description,
|
||||
|
@ -12,7 +17,8 @@ export {
|
|||
soWeCanGetItTo80Columns
|
||||
};
|
||||
export {fitsIn, oneLine};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export {
|
||||
runTaskForChanged,
|
||||
description,
|
||||
|
@ -25,21 +31,16 @@ export {
|
|||
};
|
||||
export { fitsIn, oneLine };
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`bracket.js - flow-verify 2`] = `
|
||||
export {
|
||||
runTaskForChanged,
|
||||
description,
|
||||
someOtherLabel,
|
||||
thatMakes,
|
||||
itGo,
|
||||
multiLine,
|
||||
andMore,
|
||||
soWeCanGetItTo80Columns
|
||||
};
|
||||
export {fitsIn, oneLine};
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`bracket.js 2`] = `
|
||||
====================================options=====================================
|
||||
bracketSpacing: false
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export {
|
||||
runTaskForChanged,
|
||||
description,
|
||||
|
@ -52,22 +53,51 @@ export {
|
|||
};
|
||||
export {fitsIn, oneLine};
|
||||
|
||||
=====================================output=====================================
|
||||
export {
|
||||
runTaskForChanged,
|
||||
description,
|
||||
someOtherLabel,
|
||||
thatMakes,
|
||||
itGo,
|
||||
multiLine,
|
||||
andMore,
|
||||
soWeCanGetItTo80Columns
|
||||
};
|
||||
export {fitsIn, oneLine};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`empty.js - flow-verify 1`] = `
|
||||
export {};
|
||||
export {} from ".";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`empty.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export {};
|
||||
export {} from ".";
|
||||
|
||||
=====================================output=====================================
|
||||
export {};
|
||||
export {} from ".";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`empty.js - flow-verify 2`] = `
|
||||
export {};
|
||||
export {} from ".";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`empty.js 2`] = `
|
||||
====================================options=====================================
|
||||
bracketSpacing: false
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export {};
|
||||
export {} from ".";
|
||||
|
||||
=====================================output=====================================
|
||||
export {};
|
||||
export {} from ".";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`body.js - flow-verify 1`] = `
|
||||
export default (class {}[1] = 1);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`body.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export default (class {}[1] = 1);
|
||||
|
||||
=====================================output=====================================
|
||||
export default (class {}[1] = 1);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,16 +1,23 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`export.js - babylon-verify 1`] = `
|
||||
exports[`export.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export * as ns from 'mod';
|
||||
export v from 'mod';
|
||||
export a, * as b from 'mod';
|
||||
export c, { foo } from 'mod';
|
||||
export * as d, { bar } from 'mod';
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export * as ns from "mod";
|
||||
export v from "mod";
|
||||
export a, * as b from "mod";
|
||||
export c, { foo } from "mod";
|
||||
export * as d, { bar } from "mod";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`test.js - babylon-verify 1`] = `
|
||||
exports[`test.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports";
|
||||
|
||||
export a,{b} from "./baz";
|
||||
|
@ -8,7 +13,8 @@ export a,{b} from "./baz";
|
|||
export * as ns from "mod";
|
||||
|
||||
export * as foo,{bar} from "./baz";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
export {
|
||||
value1,
|
||||
value2 as value2_renamed,
|
||||
|
@ -23,4 +29,5 @@ export * as ns from "mod";
|
|||
|
||||
export * as foo, { bar } from "./baz";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,19 +1,33 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`no_regression.js - babylon-verify 1`] = `
|
||||
// Ensure no regression.
|
||||
"use strict";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`no_regression.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Ensure no regression.
|
||||
"use strict";
|
||||
|
||||
=====================================output=====================================
|
||||
// Ensure no regression.
|
||||
"use strict";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`use_strict.js - babylon-verify 1`] = `
|
||||
// Parentheses around expression statement should be preserved in this case.
|
||||
("use strict");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`use_strict.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// Parentheses around expression statement should be preserved in this case.
|
||||
("use strict");
|
||||
|
||||
=====================================output=====================================
|
||||
// Parentheses around expression statement should be preserved in this case.
|
||||
("use strict");
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`test.js - babylon-verify 1`] = `
|
||||
exports[`test.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babylon", "flow", "typescript"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
setTimeout(function() {
|
||||
thing();
|
||||
}, 500);
|
||||
|
@ -114,7 +119,8 @@ setTimeout(/* blip */ function() {
|
|||
func((args) => {
|
||||
execute(args);
|
||||
}, result => result && console.log("success"))
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
setTimeout(function() {
|
||||
thing();
|
||||
}, 500);
|
||||
|
@ -277,4 +283,5 @@ func(
|
|||
result => result && console.log("success")
|
||||
);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`break-continue.js - flow-verify 1`] = `
|
||||
exports[`break-continue.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function foo() {
|
||||
while(true) { break; }
|
||||
}
|
||||
|
@ -8,7 +13,8 @@ function foo() {
|
|||
function bar() {
|
||||
L: do { continue L; } while(false)
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function foo() {
|
||||
while (true) {
|
||||
break;
|
||||
|
@ -21,16 +27,23 @@ function bar() {
|
|||
} while (false);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`return.js - flow-verify 1`] = `
|
||||
exports[`return.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function bar(x:number) { }
|
||||
function foo() {
|
||||
var x = null;
|
||||
if (x == null) return;
|
||||
bar(x);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function bar(x: number) {}
|
||||
function foo() {
|
||||
var x = null;
|
||||
|
@ -38,15 +51,23 @@ function foo() {
|
|||
bar(x);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`toplevel_throw.js - flow-verify 1`] = `
|
||||
exports[`toplevel_throw.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// @flow
|
||||
|
||||
throw new Error('foo'); // no error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// @flow
|
||||
|
||||
throw new Error("foo"); // no error
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`annot.js - flow-verify 1`] = `
|
||||
exports[`annot.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function foo(str:string, i:number):string {
|
||||
return str;
|
||||
}
|
||||
|
@ -61,7 +66,8 @@ var zer : null = null;
|
|||
|
||||
function foobar(n : ?number) : number | null | void { return n; }
|
||||
function barfoo(n : number | null | void) : ?number { return n; }
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function foo(str: string, i: number): string {
|
||||
return str;
|
||||
}
|
||||
|
@ -132,9 +138,15 @@ function barfoo(n: number | null | void): ?number {
|
|||
return n;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`forward_ref.js - flow-verify 1`] = `
|
||||
exports[`forward_ref.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
let myClassInstance: MyClass = null; // forward ref ok, null ~> class error
|
||||
|
||||
function bar(): MyClass {
|
||||
|
@ -149,7 +161,8 @@ function foo() {
|
|||
|
||||
class MyClass { } // looked up above
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
let myClassInstance: MyClass = null; // forward ref ok, null ~> class error
|
||||
|
||||
function bar(): MyClass {
|
||||
|
@ -167,20 +180,33 @@ function foo() {
|
|||
class MyClass {} // looked up above
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`issue-530.js - flow-verify 1`] = `
|
||||
exports[`issue-530.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function foo(...args: any) { }
|
||||
|
||||
module.exports = foo;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function foo(...args: any) {}
|
||||
|
||||
module.exports = foo;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`leak.js - flow-verify 1`] = `
|
||||
exports[`leak.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/** @flow */
|
||||
|
||||
/* This test documents an example we ran into of a type annotation leaking.
|
||||
|
@ -203,7 +229,8 @@ function foo(x: {[key: string]: mixed}) {
|
|||
function bar(y: MyObj): string {
|
||||
return y.foo;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/** @flow */
|
||||
|
||||
/* This test documents an example we ran into of a type annotation leaking.
|
||||
|
@ -227,18 +254,31 @@ function bar(y: MyObj): string {
|
|||
return y.foo;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`other.js - flow-verify 1`] = `
|
||||
exports[`other.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
class C { }
|
||||
module.exports = (C: any);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
class C {}
|
||||
module.exports = (C: any);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`scope.js - flow-verify 1`] = `
|
||||
exports[`scope.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
type Merge<T> = (a: T, b: T) => T;
|
||||
|
||||
// hypothetical immutable map
|
||||
|
@ -263,7 +303,8 @@ class Foo<A> {
|
|||
}
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
type Merge<T> = (a: T, b: T) => T;
|
||||
|
||||
// hypothetical immutable map
|
||||
|
@ -293,13 +334,21 @@ class Foo<A> {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`test.js - flow-verify 1`] = `
|
||||
exports[`test.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
var C = require('./other');
|
||||
((0: C): string);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
var C = require("./other");
|
||||
((0: C): string);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,16 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`A.js - flow-verify 1`] = `
|
||||
type T = any;
|
||||
|
||||
export default class {
|
||||
p: T;
|
||||
|
||||
constructor() {
|
||||
this.p = 0;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`A.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
type T = any;
|
||||
|
||||
export default class {
|
||||
|
@ -21,19 +16,38 @@ export default class {
|
|||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
type T = any;
|
||||
|
||||
export default class {
|
||||
p: T;
|
||||
|
||||
constructor() {
|
||||
this.p = 0;
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`B.js - flow-verify 1`] = `
|
||||
exports[`B.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
import A from "./A"
|
||||
|
||||
class B extends A {
|
||||
p: string; // OK, string ~> any
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
import A from "./A";
|
||||
|
||||
class B extends A {
|
||||
p: string; // OK, string ~> any
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,21 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`A.js - flow-verify 1`] = `
|
||||
/**
|
||||
* @providesModule A
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import type T from "T";
|
||||
|
||||
export default class {
|
||||
p: T;
|
||||
|
||||
constructor() {
|
||||
this.p = 0;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`A.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/**
|
||||
* @providesModule A
|
||||
* @flow
|
||||
|
@ -31,9 +21,31 @@ export default class {
|
|||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
/**
|
||||
* @providesModule A
|
||||
* @flow
|
||||
*/
|
||||
|
||||
import type T from "T";
|
||||
|
||||
export default class {
|
||||
p: T;
|
||||
|
||||
constructor() {
|
||||
this.p = 0;
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`B.js - flow-verify 1`] = `
|
||||
exports[`B.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/**
|
||||
* @flow
|
||||
*/
|
||||
|
@ -43,7 +55,8 @@ import A from "A"
|
|||
class B extends A {
|
||||
p: string; // OK, string ~> any
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/**
|
||||
* @flow
|
||||
*/
|
||||
|
@ -54,15 +67,23 @@ class B extends A {
|
|||
p: string; // OK, string ~> any
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`T.js - flow-verify 1`] = `
|
||||
/**
|
||||
* @providesModule T
|
||||
*/
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`T.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/**
|
||||
* @providesModule T
|
||||
*/
|
||||
|
||||
=====================================output=====================================
|
||||
/**
|
||||
* @providesModule T
|
||||
*/
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`any.js - flow-verify 1`] = `
|
||||
exports[`any.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// @flow
|
||||
|
||||
function foo(x:any):any { return x; }
|
||||
|
@ -10,7 +15,8 @@ function qux(x:mixed):any { return x; }
|
|||
var x:string = foo(0);
|
||||
var y:string = bar(0);
|
||||
var z:string = qux(0);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// @flow
|
||||
|
||||
function foo(x: any): any {
|
||||
|
@ -27,20 +33,33 @@ var x: string = foo(0);
|
|||
var y: string = bar(0);
|
||||
var z: string = qux(0);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`anyexportflowfile.js - flow-verify 1`] = `
|
||||
// @flow
|
||||
|
||||
module.exports = ((x: any) => x: any);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`anyexportflowfile.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// @flow
|
||||
|
||||
module.exports = ((x: any) => x: any);
|
||||
|
||||
=====================================output=====================================
|
||||
// @flow
|
||||
|
||||
module.exports = ((x: any) => x: any);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`flowfixme.js - flow-verify 1`] = `
|
||||
exports[`flowfixme.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/*
|
||||
FlowFixMe is a synonym for any, used by the Flow team to
|
||||
signal a needed mod to JS devs.
|
||||
|
@ -60,7 +79,8 @@ var x:string = foo(0);
|
|||
var y:string = bar(0);
|
||||
var z:string = qux(0);
|
||||
var w:string = baz(0);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/*
|
||||
FlowFixMe is a synonym for any, used by the Flow team to
|
||||
signal a needed mod to JS devs.
|
||||
|
@ -89,9 +109,15 @@ var y: string = bar(0);
|
|||
var z: string = qux(0);
|
||||
var w: string = baz(0);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`flowissue.js - flow-verify 1`] = `
|
||||
exports[`flowissue.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/*
|
||||
$FlowIssue is a synonym for any, used by JS devs to signal
|
||||
a potential typechecker bug to the Flow team.
|
||||
|
@ -111,7 +137,8 @@ var x:string = foo(0);
|
|||
var y:string = bar(0);
|
||||
var z:string = qux(0);
|
||||
var w:string = baz(0);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/*
|
||||
$FlowIssue is a synonym for any, used by JS devs to signal
|
||||
a potential typechecker bug to the Flow team.
|
||||
|
@ -140,20 +167,33 @@ var y: string = bar(0);
|
|||
var z: string = qux(0);
|
||||
var w: string = baz(0);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`nonflowfile.js - flow-verify 1`] = `
|
||||
exports[`nonflowfile.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// @noflow
|
||||
|
||||
module.exports = (x) => x;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// @noflow
|
||||
|
||||
module.exports = x => x;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`propagate.js - flow-verify 1`] = `
|
||||
exports[`propagate.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// @flow
|
||||
|
||||
declare class C {
|
||||
|
@ -179,7 +219,8 @@ function bar2(x: mixed) {
|
|||
(x: boolean);
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// @flow
|
||||
|
||||
declare class C {
|
||||
|
@ -206,23 +247,15 @@ function bar2(x: mixed) {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`reach.js - flow-verify 1`] = `
|
||||
/**
|
||||
* like class and function values, any-typed values may be used in
|
||||
* type annotations. Here we test propagation of any through the
|
||||
* annotation - without it, the body of the if will be unreachable
|
||||
*/
|
||||
|
||||
type AsyncRequest = any;
|
||||
|
||||
function foo(o: ?AsyncRequest) {
|
||||
if (o) {
|
||||
var n: number = o;
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`reach.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/**
|
||||
* like class and function values, any-typed values may be used in
|
||||
* type annotations. Here we test propagation of any through the
|
||||
|
@ -237,4 +270,20 @@ function foo(o: ?AsyncRequest) {
|
|||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
/**
|
||||
* like class and function values, any-typed values may be used in
|
||||
* type annotations. Here we test propagation of any through the
|
||||
* annotation - without it, the body of the if will be unreachable
|
||||
*/
|
||||
|
||||
type AsyncRequest = any;
|
||||
|
||||
function foo(o: ?AsyncRequest) {
|
||||
if (o) {
|
||||
var n: number = o;
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Arith.js - flow-verify 1`] = `
|
||||
exports[`Arith.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
/* @providesModule Arith */
|
||||
|
||||
|
@ -92,7 +97,8 @@ let tests = [
|
|||
(z + x: empty); // error, string ~> empty
|
||||
},
|
||||
];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/* @providesModule Arith */
|
||||
|
||||
function num(x: number) {}
|
||||
|
@ -184,21 +190,15 @@ let tests = [
|
|||
}
|
||||
];
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`exponent.js - flow-verify 1`] = `
|
||||
/* @flow */
|
||||
|
||||
let x: number = 2 ** 3;
|
||||
x **= 4;
|
||||
|
||||
let y: string = "123";
|
||||
y **= 2; // error
|
||||
|
||||
1 + 2 ** 3 + 4;
|
||||
2 ** 2;
|
||||
(-2) ** 2;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`exponent.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/* @flow */
|
||||
|
||||
let x: number = 2 ** 3;
|
||||
|
@ -211,9 +211,28 @@ y **= 2; // error
|
|||
2 ** 2;
|
||||
(-2) ** 2;
|
||||
|
||||
=====================================output=====================================
|
||||
/* @flow */
|
||||
|
||||
let x: number = 2 ** 3;
|
||||
x **= 4;
|
||||
|
||||
let y: string = "123";
|
||||
y **= 2; // error
|
||||
|
||||
1 + 2 ** 3 + 4;
|
||||
2 ** 2;
|
||||
(-2) ** 2;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`generic.js - flow-verify 1`] = `
|
||||
exports[`generic.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/* @flow */
|
||||
|
||||
function f<A>(a: A): A { return a + a; } // error
|
||||
|
@ -221,7 +240,8 @@ function f<A,B>(a: A, b: B): A {return a + b; } // error
|
|||
function f<A,B>(a: A, b: B): A {return b + a; } // error
|
||||
function f<A,B>(a: A, b: B): B {return a + b; } // error
|
||||
function f<A,B>(a: A, b: B): B {return b + a; } // error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/* @flow */
|
||||
|
||||
function f<A>(a: A): A {
|
||||
|
@ -240,9 +260,15 @@ function f<A, B>(a: A, b: B): B {
|
|||
return b + a;
|
||||
} // error
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`mult.js - flow-verify 1`] = `
|
||||
exports[`mult.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/* @flow */
|
||||
|
||||
function num(x:number) { }
|
||||
|
@ -255,7 +281,8 @@ x *= 4;
|
|||
|
||||
let y: string = "123";
|
||||
y *= 2; // error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/* @flow */
|
||||
|
||||
function num(x: number) {}
|
||||
|
@ -269,9 +296,15 @@ x *= 4;
|
|||
let y: string = "123";
|
||||
y *= 2; // error
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`relational.js - flow-verify 1`] = `
|
||||
exports[`relational.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/* @flow */
|
||||
|
||||
(1 < 2);
|
||||
|
@ -302,7 +335,8 @@ let tests = [
|
|||
(x > z);
|
||||
},
|
||||
];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/* @flow */
|
||||
|
||||
1 < 2;
|
||||
|
@ -334,4 +368,5 @@ let tests = [
|
|||
}
|
||||
];
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`test.js - flow-verify 1`] = `
|
||||
exports[`test.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/* @flow */
|
||||
|
||||
function filterOutVoids<T> (arr: Array<?T>): Array<T> {
|
||||
|
@ -10,7 +15,8 @@ function filterOutVoids<T> (arr: Array<?T>): Array<T> {
|
|||
function filterOutSmall (arr: Array<?number>): Array<?number> {
|
||||
return arr.filter(num => num && num > 10)
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/* @flow */
|
||||
|
||||
function filterOutVoids<T>(arr: Array<?T>): Array<T> {
|
||||
|
@ -21,9 +27,15 @@ function filterOutSmall(arr: Array<?number>): Array<?number> {
|
|||
return arr.filter(num => num && num > 10);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`test2.js - flow-verify 1`] = `
|
||||
exports[`test2.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/* @flow */
|
||||
|
||||
function filterItems(items: Array<string|number>): Array<string|number> {
|
||||
|
@ -39,7 +51,8 @@ function filterItems(items: Array<string|number>): Array<string|number> {
|
|||
const filteredItems = filterItems(['foo', 'b', 1, 2]);
|
||||
|
||||
console.log(filteredItems);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/* @flow */
|
||||
|
||||
function filterItems(items: Array<string | number>): Array<string | number> {
|
||||
|
@ -58,4 +71,5 @@ const filteredItems = filterItems(["foo", "b", 1, 2]);
|
|||
|
||||
console.log(filteredItems);
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`test.js - flow-verify 1`] = `
|
||||
exports[`test.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
var A = [1,2,3];
|
||||
var B = [...A];
|
||||
var C = [1,2,3];
|
||||
|
@ -9,7 +14,8 @@ C.sort((a, b) => a - b);
|
|||
|
||||
var x: Array<string> = ['1', '2'];
|
||||
var y: Array<string> = ['3', ...x];
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
var A = [1, 2, 3];
|
||||
var B = [...A];
|
||||
var C = [1, 2, 3];
|
||||
|
@ -19,4 +25,5 @@ C.sort((a, b) => a - b);
|
|||
var x: Array<string> = ["1", "2"];
|
||||
var y: Array<string> = ["3", ...x];
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`array_lib.js - flow-verify 1`] = `
|
||||
exports[`array_lib.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/* @flow */
|
||||
function foo(x:string) { }
|
||||
|
||||
|
@ -58,7 +63,8 @@ function from_test() {
|
|||
return String(val);
|
||||
});
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/* @flow */
|
||||
function foo(x: string) {}
|
||||
|
||||
|
@ -122,4 +128,5 @@ function from_test() {
|
|||
});
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Arrays.js - flow-verify 1`] = `
|
||||
exports[`Arrays.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
|
||||
/* @providesModule Arrays */
|
||||
|
||||
|
@ -40,7 +45,8 @@ var abig2: Array<{x:number; y:number}> = [
|
|||
];
|
||||
|
||||
module.exports = "arrays";
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
/* @providesModule Arrays */
|
||||
|
||||
function foo(x: string) {}
|
||||
|
@ -80,9 +86,15 @@ var abig2: Array<{ x: number, y: number }> = [
|
|||
|
||||
module.exports = "arrays";
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`numeric_elem.js - flow-verify 1`] = `
|
||||
exports[`numeric_elem.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
var arr = [];
|
||||
var day = new Date;
|
||||
|
||||
|
@ -90,7 +102,8 @@ var day = new Date;
|
|||
// arrays.
|
||||
arr[day] = 0;
|
||||
(arr[day]: string); // error: number ~> string
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
var arr = [];
|
||||
var day = new Date();
|
||||
|
||||
|
@ -99,4 +112,5 @@ var day = new Date();
|
|||
arr[day] = 0;
|
||||
(arr[day]: string); // error: number ~> string
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,18 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`advanced_arrows.js - flow-verify 1`] = `
|
||||
/**
|
||||
* @flow
|
||||
*/
|
||||
|
||||
var add = (x: number, y: number): number => x + y;
|
||||
|
||||
var bad = (x: number): string => x; // Error!
|
||||
|
||||
var ident = <T>(x: T): T => x;
|
||||
(ident(1): number);
|
||||
(ident("hi"): number); // Error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`advanced_arrows.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
/**
|
||||
* @flow
|
||||
*/
|
||||
|
@ -25,9 +18,28 @@ var ident = <T>(x: T): T => x;
|
|||
(ident(1): number);
|
||||
(ident("hi"): number); // Error
|
||||
|
||||
=====================================output=====================================
|
||||
/**
|
||||
* @flow
|
||||
*/
|
||||
|
||||
var add = (x: number, y: number): number => x + y;
|
||||
|
||||
var bad = (x: number): string => x; // Error!
|
||||
|
||||
var ident = <T>(x: T): T => x;
|
||||
(ident(1): number);
|
||||
(ident("hi"): number); // Error
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`arrows.js - flow-verify 1`] = `
|
||||
exports[`arrows.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
function selectBestEffortImageForWidth(
|
||||
maxWidth: number,
|
||||
images: Array<Image>
|
||||
|
@ -38,7 +50,8 @@ function selectBestEffortImageForWidth(
|
|||
return images.find(image => image.width >= maxPixelWidth) ||
|
||||
images[images.length - 1];
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
function selectBestEffortImageForWidth(
|
||||
maxWidth: number,
|
||||
images: Array<Image>
|
||||
|
@ -52,4 +65,5 @@ function selectBestEffortImageForWidth(
|
|||
);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`async.js - flow-verify 1`] = `
|
||||
exports[`async.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// @flow
|
||||
|
||||
// "For async functions, a Promise<T> is returned,
|
||||
|
@ -53,7 +58,8 @@ class C {
|
|||
|
||||
var obj = { f: async () => await 1 };
|
||||
var objf : () => Promise<number> = obj.f;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// @flow
|
||||
|
||||
// "For async functions, a Promise<T> is returned,
|
||||
|
@ -115,9 +121,15 @@ class C {
|
|||
var obj = { f: async () => await 1 };
|
||||
var objf: () => Promise<number> = obj.f;
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`async_base_class.js - flow-verify 1`] = `
|
||||
exports[`async_base_class.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// This is kind of weird, but it should parse. This works in babel without the
|
||||
// parens around (await promise). From the es6 and async/await specs I (nmote)
|
||||
// am not clear on whether it should. In any case it's a strange corner case
|
||||
|
@ -132,7 +144,8 @@ async function foo() {
|
|||
class Bar extends (await P) { }
|
||||
return Bar;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// This is kind of weird, but it should parse. This works in babel without the
|
||||
// parens around (await promise). From the es6 and async/await specs I (nmote)
|
||||
// am not clear on whether it should. In any case it's a strange corner case
|
||||
|
@ -148,9 +161,15 @@ async function foo() {
|
|||
return Bar;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`async_parse.js - flow-verify 1`] = `
|
||||
exports[`async_parse.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
async function f() {}
|
||||
async function ft<T>(a: T) {}
|
||||
|
||||
|
@ -175,7 +194,8 @@ console.log(x.async);
|
|||
|
||||
var async = 3;
|
||||
var y = { async };
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
async function f() {}
|
||||
async function ft<T>(a: T) {}
|
||||
|
||||
|
@ -201,20 +221,33 @@ console.log(x.async);
|
|||
var async = 3;
|
||||
var y = { async };
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`async_promise.js - flow-verify 1`] = `
|
||||
async function f(): Promise<number> {
|
||||
return Promise.resolve(1);
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`async_promise.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
async function f(): Promise<number> {
|
||||
return Promise.resolve(1);
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
async function f(): Promise<number> {
|
||||
return Promise.resolve(1);
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`async_return_void.js - flow-verify 1`] = `
|
||||
exports[`async_return_void.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// @flow
|
||||
|
||||
async function foo1(): Promise<string> {
|
||||
|
@ -229,7 +262,8 @@ async function foo3(): Promise<string> {
|
|||
function bar() { }
|
||||
return bar();
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// @flow
|
||||
|
||||
async function foo1(): Promise<string> {
|
||||
|
@ -245,9 +279,15 @@ async function foo3(): Promise<string> {
|
|||
return bar();
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`async2.js - flow-verify 1`] = `
|
||||
exports[`async2.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// @flow
|
||||
|
||||
// misc basic
|
||||
|
@ -308,7 +348,8 @@ function test5() {
|
|||
console.log("HEY");
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// @flow
|
||||
|
||||
// misc basic
|
||||
|
@ -372,9 +413,15 @@ function test5() {
|
|||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`async3.js - flow-verify 1`] = `
|
||||
exports[`async3.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// @flow
|
||||
|
||||
/**
|
||||
|
@ -407,7 +454,8 @@ async function baz() {
|
|||
// Promise ~> string error for the same reason
|
||||
var c: string = a;
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
// @flow
|
||||
|
||||
/**
|
||||
|
@ -440,9 +488,15 @@ async function baz() {
|
|||
var c: string = a;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`await_parse.js - flow-verify 1`] = `
|
||||
exports[`await_parse.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
async function f() { await 1; }
|
||||
async function ft<T>(a: T) { await 1; }
|
||||
|
||||
|
@ -467,7 +521,8 @@ console.log(x.await);
|
|||
|
||||
var await = 3;
|
||||
var y = { await };
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
async function f() {
|
||||
await 1;
|
||||
}
|
||||
|
@ -523,4 +578,5 @@ console.log(x.await);
|
|||
var await = 3;
|
||||
var y = { await };
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`delegate_yield.js - flow-verify 1`] = `
|
||||
exports[`delegate_yield.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
async function *delegate_next() {
|
||||
async function *inner() {
|
||||
var x: void = yield; // error: number ~> void
|
||||
|
@ -27,7 +32,8 @@ async function *delegate_return() {
|
|||
}
|
||||
var x: void = yield *inner(); // error: number ~> void
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
async function* delegate_next() {
|
||||
async function* inner() {
|
||||
var x: void = yield; // error: number ~> void
|
||||
|
@ -55,35 +61,15 @@ async function* delegate_return() {
|
|||
var x: void = yield* inner(); // error: number ~> void
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`generator.js - flow-verify 1`] = `
|
||||
declare interface File {
|
||||
readLine(): Promise<string>;
|
||||
close(): void;
|
||||
EOF: boolean;
|
||||
}
|
||||
|
||||
declare function fileOpen(path: string): Promise<File>;
|
||||
|
||||
async function* readLines(path) {
|
||||
let file: File = await fileOpen(path);
|
||||
|
||||
try {
|
||||
while (!file.EOF) {
|
||||
yield await file.readLine();
|
||||
}
|
||||
} finally {
|
||||
file.close();
|
||||
}
|
||||
}
|
||||
|
||||
async function f() {
|
||||
for await (const line of readLines("/path/to/file")) {
|
||||
(line: void); // error: string ~> void
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
exports[`generator.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
declare interface File {
|
||||
readLine(): Promise<string>;
|
||||
close(): void;
|
||||
|
@ -110,9 +96,42 @@ async function f() {
|
|||
}
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
declare interface File {
|
||||
readLine(): Promise<string>;
|
||||
close(): void;
|
||||
EOF: boolean;
|
||||
}
|
||||
|
||||
declare function fileOpen(path: string): Promise<File>;
|
||||
|
||||
async function* readLines(path) {
|
||||
let file: File = await fileOpen(path);
|
||||
|
||||
try {
|
||||
while (!file.EOF) {
|
||||
yield await file.readLine();
|
||||
}
|
||||
} finally {
|
||||
file.close();
|
||||
}
|
||||
}
|
||||
|
||||
async function f() {
|
||||
for await (const line of readLines("/path/to/file")) {
|
||||
(line: void); // error: string ~> void
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`return.js - flow-verify 1`] = `
|
||||
exports[`return.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
declare var gen: AsyncGenerator<void,string,void>;
|
||||
|
||||
// You can pass whatever you like to return, it doesn't need to be related to
|
||||
|
@ -135,7 +154,8 @@ refuse_return().return("string").then(result => {
|
|||
(result.value: string); // error: number | void ~> string
|
||||
}
|
||||
});
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
declare var gen: AsyncGenerator<void, string, void>;
|
||||
|
||||
// You can pass whatever you like to return, it doesn't need to be related to
|
||||
|
@ -161,9 +181,15 @@ refuse_return()
|
|||
}
|
||||
});
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`throw.js - flow-verify 1`] = `
|
||||
exports[`throw.js 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["flow", "babylon"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
async function *catch_return() {
|
||||
try {
|
||||
yield 0;
|
||||
|
@ -196,7 +222,8 @@ async function *yield_return() {
|
|||
}
|
||||
});
|
||||
});
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
=====================================output=====================================
|
||||
async function* catch_return() {
|
||||
try {
|
||||
yield 0;
|
||||
|
@ -234,4 +261,5 @@ async () => {
|
|||
});
|
||||
};
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue