2017-02-22 00:59:19 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`arrow.js - flow-verify 1`] = `
|
2017-04-12 23:41:51 +03:00
|
|
|
function f() {
|
2017-02-16 07:00:02 +03:00
|
|
|
const appEntitys = getAppEntitys(loadObject).filter(
|
|
|
|
entity => entity && entity.isInstallAvailable() && !entity.isQueue() && entity.isDisabled()
|
|
|
|
)
|
|
|
|
}
|
2017-09-07 21:28:12 +03:00
|
|
|
|
|
|
|
function f() {
|
|
|
|
const appEntitys = getAppEntitys(loadObject).map(
|
|
|
|
entity => entity && entity.isInstallAvailable() && !entity.isQueue() && entity.isDisabled() && {
|
|
|
|
id: entity.id
|
|
|
|
}
|
|
|
|
)
|
|
|
|
}
|
2017-02-16 07:00:02 +03:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
function f() {
|
|
|
|
const appEntitys = getAppEntitys(loadObject).filter(
|
|
|
|
entity =>
|
|
|
|
entity &&
|
|
|
|
entity.isInstallAvailable() &&
|
|
|
|
!entity.isQueue() &&
|
|
|
|
entity.isDisabled()
|
|
|
|
);
|
|
|
|
}
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2017-09-07 21:28:12 +03:00
|
|
|
function f() {
|
|
|
|
const appEntitys = getAppEntitys(loadObject).map(
|
|
|
|
entity =>
|
|
|
|
entity &&
|
|
|
|
entity.isInstallAvailable() &&
|
|
|
|
!entity.isQueue() &&
|
|
|
|
entity.isDisabled() && {
|
|
|
|
id: entity.id
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2017-02-16 07:00:02 +03:00
|
|
|
`;
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`bitwise-flags.js - flow-verify 1`] = `
|
2017-07-08 10:31:28 +03:00
|
|
|
const FLAG_A = 1 << 0;
|
|
|
|
const FLAG_B = 1 << 1;
|
|
|
|
const FLAG_C = 1 << 2;
|
|
|
|
|
|
|
|
const all = FLAG_A | FLAG_B | FLAG_C;
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
const FLAG_A = 1 << 0;
|
|
|
|
const FLAG_B = 1 << 1;
|
|
|
|
const FLAG_C = 1 << 2;
|
|
|
|
|
|
|
|
const all = FLAG_A | FLAG_B | FLAG_C;
|
|
|
|
|
|
|
|
`;
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`comment.js - flow-verify 1`] = `
|
2017-04-12 23:41:51 +03:00
|
|
|
a = (
|
2017-03-21 22:13:13 +03:00
|
|
|
// Commment 1
|
|
|
|
(Math.random() * (yRange * (1 - minVerticalFraction)))
|
|
|
|
+ (minVerticalFraction * yRange)
|
|
|
|
) - offset;
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
a =
|
|
|
|
// Commment 1
|
|
|
|
Math.random() * (yRange * (1 - minVerticalFraction)) +
|
|
|
|
minVerticalFraction * yRange -
|
|
|
|
offset;
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2017-03-21 22:13:13 +03:00
|
|
|
`;
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`equality.js - flow-verify 1`] = `
|
2017-07-07 16:57:17 +03:00
|
|
|
x == y == z;
|
|
|
|
x != y == z;
|
|
|
|
x == y != z;
|
|
|
|
x != y != z;
|
|
|
|
|
|
|
|
x === y === z;
|
|
|
|
x !== y === z;
|
|
|
|
x === y !== z;
|
|
|
|
x !== y !== z;
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
(x == y) == z;
|
|
|
|
(x != y) == z;
|
|
|
|
(x == y) != z;
|
|
|
|
(x != y) != z;
|
|
|
|
|
|
|
|
(x === y) === z;
|
|
|
|
(x !== y) === z;
|
|
|
|
(x === y) !== z;
|
|
|
|
(x !== y) !== z;
|
|
|
|
|
|
|
|
`;
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`exp.js - flow-verify 1`] = `
|
2017-04-12 23:41:51 +03:00
|
|
|
a ** b ** c;
|
2017-03-09 00:11:53 +03:00
|
|
|
(a ** b) ** c;
|
|
|
|
a.b ** c;
|
|
|
|
(-a) ** b;
|
|
|
|
a ** -b;
|
|
|
|
-(a**b);
|
|
|
|
(a * b) ** c;
|
|
|
|
a ** (b * c);
|
2018-10-12 19:33:47 +03:00
|
|
|
(a % b) ** c;
|
2017-03-09 00:11:53 +03:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2017-07-07 16:57:17 +03:00
|
|
|
a ** (b ** c);
|
2017-03-09 00:11:53 +03:00
|
|
|
(a ** b) ** c;
|
|
|
|
a.b ** c;
|
|
|
|
(-a) ** b;
|
|
|
|
a ** -b;
|
|
|
|
-(a ** b);
|
|
|
|
(a * b) ** c;
|
|
|
|
a ** (b * c);
|
2018-10-12 19:33:47 +03:00
|
|
|
(a % b) ** c;
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2017-03-09 00:11:53 +03:00
|
|
|
`;
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`if.js - flow-verify 1`] = `
|
2017-04-19 20:43:48 +03:00
|
|
|
if (this.hasPlugin("dynamicImports") && this.lookahead().type) {}
|
|
|
|
|
|
|
|
if (this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft) {}
|
|
|
|
|
|
|
|
if (this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right) {}
|
2017-04-19 23:18:01 +03:00
|
|
|
|
|
|
|
if (VeryVeryVeryVeryVeryVeryVeryVeryLong === VeryVeryVeryVeryVeryVeryVeryVeryLong) {
|
|
|
|
}
|
2017-04-19 20:43:48 +03:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
if (this.hasPlugin("dynamicImports") && this.lookahead().type) {
|
|
|
|
}
|
|
|
|
|
|
|
|
if (
|
|
|
|
this.hasPlugin("dynamicImports") &&
|
|
|
|
this.lookahead().type === tt.parenLeft
|
|
|
|
) {
|
|
|
|
}
|
|
|
|
|
|
|
|
if (
|
|
|
|
this.hasPlugin("dynamicImports") &&
|
|
|
|
this.lookahead().type === tt.parenLeft.right
|
|
|
|
) {
|
|
|
|
}
|
|
|
|
|
2017-04-19 23:18:01 +03:00
|
|
|
if (
|
|
|
|
VeryVeryVeryVeryVeryVeryVeryVeryLong === VeryVeryVeryVeryVeryVeryVeryVeryLong
|
|
|
|
) {
|
|
|
|
}
|
|
|
|
|
2017-04-19 20:43:48 +03:00
|
|
|
`;
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`inline-jsx.js - flow-verify 1`] = `
|
2017-09-20 18:07:51 +03:00
|
|
|
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>;
|
|
|
|
|
|
|
|
const avatar = hasAvatar && <Gravatar user={author} size={size} />;
|
|
|
|
|
|
|
|
const avatar = (hasAvatar || showPlaceholder) && <Gravatar user={author} size={size} />;
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
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>
|
|
|
|
));
|
|
|
|
|
|
|
|
const avatar = hasAvatar && <Gravatar user={author} size={size} />;
|
|
|
|
|
|
|
|
const avatar = (hasAvatar || showPlaceholder) && (
|
|
|
|
<Gravatar user={author} size={size} />
|
|
|
|
);
|
|
|
|
|
|
|
|
`;
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`inline-object-array.js - flow-verify 1`] = `
|
2017-04-12 23:41:51 +03:00
|
|
|
prevState = prevState || {
|
2017-02-15 17:41:06 +03:00
|
|
|
catalogs: [],
|
|
|
|
loadState: LOADED,
|
|
|
|
opened: false,
|
2017-02-22 00:59:19 +03:00
|
|
|
searchQuery: '',
|
2017-02-15 17:41:06 +03:00
|
|
|
selectedCatalog: null,
|
|
|
|
};
|
|
|
|
|
2017-09-07 21:28:12 +03:00
|
|
|
prevState = prevState ||
|
|
|
|
defaultState || {
|
|
|
|
catalogs: [],
|
|
|
|
loadState: LOADED,
|
|
|
|
opened: false,
|
|
|
|
searchQuery: '',
|
|
|
|
selectedCatalog: null,
|
|
|
|
};
|
|
|
|
|
2017-09-20 18:07:51 +03:00
|
|
|
prevState = prevState ||
|
|
|
|
defaultState && {
|
|
|
|
catalogs: [],
|
|
|
|
loadState: LOADED,
|
|
|
|
opened: false,
|
|
|
|
searchQuery: '',
|
|
|
|
selectedCatalog: null,
|
|
|
|
};
|
|
|
|
|
|
|
|
prevState = prevState || useDefault && defaultState || {
|
|
|
|
catalogs: [],
|
|
|
|
loadState: LOADED,
|
|
|
|
opened: false,
|
|
|
|
searchQuery: '',
|
|
|
|
selectedCatalog: null,
|
|
|
|
};
|
|
|
|
|
2017-02-15 17:41:06 +03:00
|
|
|
this.steps = steps || [
|
|
|
|
{
|
2017-02-22 00:59:19 +03:00
|
|
|
name: 'mock-module',
|
|
|
|
path: '/nux/mock-module',
|
2017-02-15 17:41:06 +03:00
|
|
|
},
|
|
|
|
];
|
2017-09-07 21:28:12 +03:00
|
|
|
|
2017-09-20 18:07:51 +03:00
|
|
|
this.steps = steps || checkStep && [
|
|
|
|
{
|
|
|
|
name: 'mock-module',
|
|
|
|
path: '/nux/mock-module',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
this.steps = steps && checkStep || [
|
|
|
|
{
|
|
|
|
name: 'mock-module',
|
|
|
|
path: '/nux/mock-module',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2017-09-07 21:28:12 +03:00
|
|
|
const create = () => {
|
|
|
|
const result = doSomething();
|
|
|
|
return (
|
|
|
|
shouldReturn &&
|
|
|
|
result.ok && {
|
|
|
|
status: "ok",
|
|
|
|
createdAt: result.createdAt,
|
|
|
|
updatedAt: result.updatedAt
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2017-09-20 18:07:51 +03:00
|
|
|
const create = () => {
|
|
|
|
const result = doSomething();
|
|
|
|
return (
|
|
|
|
shouldReturn && result.ok && result || {
|
|
|
|
status: "ok",
|
|
|
|
createdAt: result.createdAt,
|
|
|
|
updatedAt: result.updatedAt
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2017-09-07 21:28:12 +03:00
|
|
|
const obj = {
|
|
|
|
state: shouldHaveState &&
|
|
|
|
stateIsOK && {
|
|
|
|
loadState: LOADED,
|
|
|
|
opened: false
|
|
|
|
},
|
2017-09-20 18:07:51 +03:00
|
|
|
loadNext: stateIsOK && hasNext || {
|
|
|
|
skipNext: true
|
|
|
|
},
|
2017-09-07 21:28:12 +03:00
|
|
|
loaded: true
|
|
|
|
}
|
2017-02-15 17:41:06 +03:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
prevState = prevState || {
|
|
|
|
catalogs: [],
|
|
|
|
loadState: LOADED,
|
|
|
|
opened: false,
|
2017-04-12 23:41:51 +03:00
|
|
|
searchQuery: "",
|
2017-02-15 17:41:06 +03:00
|
|
|
selectedCatalog: null
|
|
|
|
};
|
|
|
|
|
2017-09-07 21:28:12 +03:00
|
|
|
prevState = prevState ||
|
|
|
|
defaultState || {
|
|
|
|
catalogs: [],
|
|
|
|
loadState: LOADED,
|
|
|
|
opened: false,
|
|
|
|
searchQuery: "",
|
|
|
|
selectedCatalog: null
|
|
|
|
};
|
|
|
|
|
2017-09-20 18:07:51 +03:00
|
|
|
prevState =
|
|
|
|
prevState ||
|
|
|
|
(defaultState && {
|
|
|
|
catalogs: [],
|
|
|
|
loadState: LOADED,
|
|
|
|
opened: false,
|
|
|
|
searchQuery: "",
|
|
|
|
selectedCatalog: null
|
|
|
|
});
|
|
|
|
|
|
|
|
prevState = prevState ||
|
|
|
|
(useDefault && defaultState) || {
|
|
|
|
catalogs: [],
|
|
|
|
loadState: LOADED,
|
|
|
|
opened: false,
|
|
|
|
searchQuery: "",
|
|
|
|
selectedCatalog: null
|
|
|
|
};
|
|
|
|
|
2017-02-15 17:41:06 +03:00
|
|
|
this.steps = steps || [
|
|
|
|
{
|
2017-04-12 23:41:51 +03:00
|
|
|
name: "mock-module",
|
|
|
|
path: "/nux/mock-module"
|
2017-02-15 17:41:06 +03:00
|
|
|
}
|
|
|
|
];
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2017-09-20 18:07:51 +03:00
|
|
|
this.steps =
|
|
|
|
steps ||
|
|
|
|
(checkStep && [
|
|
|
|
{
|
|
|
|
name: "mock-module",
|
|
|
|
path: "/nux/mock-module"
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|
|
|
|
this.steps = (steps && checkStep) || [
|
|
|
|
{
|
|
|
|
name: "mock-module",
|
|
|
|
path: "/nux/mock-module"
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2017-09-07 21:28:12 +03:00
|
|
|
const create = () => {
|
|
|
|
const result = doSomething();
|
|
|
|
return (
|
|
|
|
shouldReturn &&
|
|
|
|
result.ok && {
|
|
|
|
status: "ok",
|
|
|
|
createdAt: result.createdAt,
|
|
|
|
updatedAt: result.updatedAt
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2017-09-20 18:07:51 +03:00
|
|
|
const create = () => {
|
|
|
|
const result = doSomething();
|
|
|
|
return (
|
|
|
|
(shouldReturn && result.ok && result) || {
|
|
|
|
status: "ok",
|
|
|
|
createdAt: result.createdAt,
|
|
|
|
updatedAt: result.updatedAt
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2017-09-07 21:28:12 +03:00
|
|
|
const obj = {
|
|
|
|
state: shouldHaveState &&
|
|
|
|
stateIsOK && {
|
|
|
|
loadState: LOADED,
|
|
|
|
opened: false
|
|
|
|
},
|
2017-09-20 18:07:51 +03:00
|
|
|
loadNext: (stateIsOK && hasNext) || {
|
|
|
|
skipNext: true
|
|
|
|
},
|
2017-09-07 21:28:12 +03:00
|
|
|
loaded: true
|
|
|
|
};
|
|
|
|
|
2017-02-15 17:41:06 +03:00
|
|
|
`;
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`jsx_parent.js - flow-verify 1`] = `
|
2017-05-06 07:44:50 +03:00
|
|
|
<div
|
|
|
|
src={
|
|
|
|
!isJellyfishEnabled &&
|
|
|
|
diffUpdateMessageInput != null &&
|
|
|
|
this.state.isUpdateMessageEmpty
|
|
|
|
}
|
|
|
|
/>;
|
|
|
|
|
|
|
|
<div>
|
|
|
|
{!isJellyfishEnabled &&
|
|
|
|
diffUpdateMessageInput != null &&
|
|
|
|
this.state.isUpdateMessageEmpty}
|
|
|
|
</div>;
|
2017-09-07 21:28:12 +03:00
|
|
|
|
|
|
|
<div
|
|
|
|
style={
|
|
|
|
!isJellyfishEnabled &&
|
|
|
|
diffUpdateMessageInput && {
|
|
|
|
fontSize: 14,
|
|
|
|
color: '#fff'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>;
|
|
|
|
|
|
|
|
<div>
|
|
|
|
{!isJellyfishEnabled &&
|
|
|
|
diffUpdateMessageInput != null && <div><span>Text</span></div>}
|
|
|
|
</div>;
|
2017-09-20 18:07:51 +03:00
|
|
|
|
|
|
|
<div>
|
|
|
|
{!isJellyfishEnabled &&
|
|
|
|
diffUpdateMessageInput != null && child || <div><span>Text</span></div>}
|
|
|
|
</div>;
|
2017-05-06 07:44:50 +03:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
<div
|
|
|
|
src={
|
|
|
|
!isJellyfishEnabled &&
|
|
|
|
diffUpdateMessageInput != null &&
|
|
|
|
this.state.isUpdateMessageEmpty
|
|
|
|
}
|
|
|
|
/>;
|
|
|
|
|
|
|
|
<div>
|
|
|
|
{!isJellyfishEnabled &&
|
|
|
|
diffUpdateMessageInput != null &&
|
|
|
|
this.state.isUpdateMessageEmpty}
|
|
|
|
</div>;
|
|
|
|
|
2017-09-07 21:28:12 +03:00
|
|
|
<div
|
|
|
|
style={
|
|
|
|
!isJellyfishEnabled &&
|
|
|
|
diffUpdateMessageInput && {
|
|
|
|
fontSize: 14,
|
|
|
|
color: "#fff"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/>;
|
|
|
|
|
|
|
|
<div>
|
2018-10-10 20:11:37 +03:00
|
|
|
{!isJellyfishEnabled && diffUpdateMessageInput != null && (
|
|
|
|
<div>
|
|
|
|
<span>Text</span>
|
|
|
|
</div>
|
|
|
|
)}
|
2017-09-07 21:28:12 +03:00
|
|
|
</div>;
|
|
|
|
|
2017-09-20 18:07:51 +03:00
|
|
|
<div>
|
|
|
|
{(!isJellyfishEnabled && diffUpdateMessageInput != null && child) || (
|
|
|
|
<div>
|
|
|
|
<span>Text</span>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</div>;
|
|
|
|
|
2017-05-06 07:44:50 +03:00
|
|
|
`;
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`math.js - flow-verify 1`] = `
|
2017-07-07 16:57:17 +03:00
|
|
|
x + y / z;
|
|
|
|
x / y + z;
|
|
|
|
|
|
|
|
x * y % z;
|
|
|
|
x / y % z;
|
|
|
|
x % y * z;
|
|
|
|
x % y / z;
|
|
|
|
|
|
|
|
x % y % z;
|
2017-07-08 10:31:28 +03:00
|
|
|
|
|
|
|
x << y >> z;
|
|
|
|
x >>> y << z;
|
|
|
|
x >>> y >>> z;
|
|
|
|
x + y >> z;
|
|
|
|
|
|
|
|
x | y & z;
|
|
|
|
x & y | z;
|
|
|
|
x ^ y ^ z;
|
|
|
|
x & y & z;
|
|
|
|
x | y | z;
|
|
|
|
x & y >> z;
|
|
|
|
x << y | z;
|
2017-07-07 16:57:17 +03:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
x + y / z;
|
|
|
|
x / y + z;
|
|
|
|
|
|
|
|
(x * y) % z;
|
|
|
|
(x / y) % z;
|
|
|
|
(x % y) * z;
|
|
|
|
(x % y) / z;
|
|
|
|
|
|
|
|
(x % y) % z;
|
|
|
|
|
2017-07-08 10:31:28 +03:00
|
|
|
(x << y) >> z;
|
|
|
|
(x >>> y) << z;
|
|
|
|
(x >>> y) >>> z;
|
|
|
|
(x + y) >> z;
|
|
|
|
|
|
|
|
x | (y & z);
|
|
|
|
(x & y) | z;
|
2017-07-15 13:54:33 +03:00
|
|
|
x ^ y ^ z;
|
|
|
|
x & y & z;
|
2017-07-08 10:31:28 +03:00
|
|
|
x | y | z;
|
|
|
|
x & (y >> z);
|
|
|
|
(x << y) | z;
|
|
|
|
|
2017-07-07 16:57:17 +03:00
|
|
|
`;
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`return.js - flow-verify 1`] = `
|
2017-09-10 08:18:40 +03:00
|
|
|
function foo() {
|
|
|
|
return this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right;
|
|
|
|
}
|
|
|
|
|
|
|
|
function foo() {
|
|
|
|
return this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right
|
|
|
|
? true
|
|
|
|
: false;
|
|
|
|
}
|
|
|
|
|
|
|
|
function foo() {
|
|
|
|
return this.calculate().compute().first.numberOfThings > this.calculate().compute().last.numberOfThings
|
|
|
|
? true
|
|
|
|
: false;
|
|
|
|
}
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
function foo() {
|
|
|
|
return (
|
|
|
|
this.hasPlugin("dynamicImports") &&
|
|
|
|
this.lookahead().type === tt.parenLeft.right
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
function foo() {
|
|
|
|
return this.hasPlugin("dynamicImports") &&
|
|
|
|
this.lookahead().type === tt.parenLeft.right
|
|
|
|
? true
|
|
|
|
: false;
|
|
|
|
}
|
|
|
|
|
|
|
|
function foo() {
|
|
|
|
return this.calculate().compute().first.numberOfThings >
|
|
|
|
this.calculate().compute().last.numberOfThings
|
|
|
|
? true
|
|
|
|
: false;
|
|
|
|
}
|
|
|
|
|
|
|
|
`;
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`short-right.js - flow-verify 1`] = `
|
2017-04-12 23:41:51 +03:00
|
|
|
this._cumulativeHeights &&
|
2017-02-09 18:44:03 +03:00
|
|
|
Math.abs(
|
|
|
|
this._cachedItemHeight(this._firstVisibleIndex + i) -
|
|
|
|
this._provider.fastHeight(i + this._firstVisibleIndex),
|
|
|
|
) >
|
|
|
|
1
|
|
|
|
|
|
|
|
foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(
|
|
|
|
aaaaaaaaaaaaaaaaaaa
|
|
|
|
) +
|
|
|
|
a;
|
|
|
|
|
|
|
|
const isPartOfPackageJSON = dependenciesArray.indexOf(
|
2017-02-22 00:59:19 +03:00
|
|
|
dependencyWithOutRelativePath.split('/')[0],
|
2017-02-09 18:44:03 +03:00
|
|
|
) !== -1;
|
2017-03-03 06:45:26 +03:00
|
|
|
|
|
|
|
defaultContent.filter(defaultLocale => {
|
|
|
|
// ...
|
|
|
|
})[0] || null;
|
2017-02-09 18:44:03 +03:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
this._cumulativeHeights &&
|
|
|
|
Math.abs(
|
|
|
|
this._cachedItemHeight(this._firstVisibleIndex + i) -
|
|
|
|
this._provider.fastHeight(i + this._firstVisibleIndex)
|
|
|
|
) > 1;
|
|
|
|
|
|
|
|
foooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(
|
|
|
|
aaaaaaaaaaaaaaaaaaa
|
|
|
|
) + a;
|
|
|
|
|
2017-03-15 19:45:40 +03:00
|
|
|
const isPartOfPackageJSON =
|
2017-04-12 23:41:51 +03:00
|
|
|
dependenciesArray.indexOf(dependencyWithOutRelativePath.split("/")[0]) !== -1;
|
2017-03-03 06:45:26 +03:00
|
|
|
|
|
|
|
defaultContent.filter(defaultLocale => {
|
|
|
|
// ...
|
|
|
|
})[0] || null;
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2017-02-09 18:44:03 +03:00
|
|
|
`;
|
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`test.js - flow-verify 1`] = `
|
2017-04-12 23:41:51 +03:00
|
|
|
// It should always break the highest precedence operators first, and
|
2017-01-25 01:35:37 +03:00
|
|
|
// break them all at the same time.
|
|
|
|
|
|
|
|
const x = longVariable + longVariable + longVariable;
|
|
|
|
const x = longVariable + longVariable + longVariable + longVariable - longVariable + longVariable;
|
|
|
|
const x = longVariable + longVariable * longVariable + longVariable - longVariable + longVariable;
|
|
|
|
const x = longVariable + longVariable * longVariable * longVariable / longVariable + longVariable;
|
|
|
|
|
|
|
|
const x = longVariable && longVariable && longVariable && longVariable && longVariable && longVariable;
|
|
|
|
const x = longVariable && longVariable || longVariable && longVariable || longVariable && longVariable;
|
2017-05-12 17:48:03 +03:00
|
|
|
const x = firstItemWithAVeryLongNameThatKeepsGoing || firstItemWithAVeryLongNameThatKeepsGoing || {};
|
|
|
|
const x = firstItemWithAVeryLongNameThatKeepsGoing || firstItemWithAVeryLongNameThatKeepsGoing || [];
|
|
|
|
const x = call(firstItemWithAVeryLongNameThatKeepsGoing, firstItemWithAVeryLongNameThatKeepsGoing) || [];
|
2017-01-25 01:35:37 +03:00
|
|
|
|
|
|
|
const x = longVariable * longint && longVariable >> 0 && longVariable + longVariable;
|
|
|
|
|
|
|
|
const x = longVariable > longint && longVariable === 0 + longVariable * longVariable;
|
|
|
|
|
|
|
|
foo(obj.property * new Class() && obj instanceof Class && longVariable ? number + 5 : false);
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
// It should always break the highest precedence operators first, and
|
|
|
|
// break them all at the same time.
|
|
|
|
|
|
|
|
const x = longVariable + longVariable + longVariable;
|
2017-03-15 19:45:40 +03:00
|
|
|
const x =
|
|
|
|
longVariable +
|
2017-01-25 01:35:37 +03:00
|
|
|
longVariable +
|
|
|
|
longVariable +
|
|
|
|
longVariable -
|
|
|
|
longVariable +
|
|
|
|
longVariable;
|
2017-03-15 19:45:40 +03:00
|
|
|
const x =
|
|
|
|
longVariable +
|
2017-01-25 01:35:37 +03:00
|
|
|
longVariable * longVariable +
|
|
|
|
longVariable -
|
|
|
|
longVariable +
|
|
|
|
longVariable;
|
2017-03-15 19:45:40 +03:00
|
|
|
const x =
|
|
|
|
longVariable +
|
2018-05-03 00:48:40 +03:00
|
|
|
(longVariable * longVariable * longVariable) / longVariable +
|
2017-01-25 01:35:37 +03:00
|
|
|
longVariable;
|
|
|
|
|
2017-03-15 19:45:40 +03:00
|
|
|
const x =
|
|
|
|
longVariable &&
|
2017-01-25 01:35:37 +03:00
|
|
|
longVariable &&
|
|
|
|
longVariable &&
|
|
|
|
longVariable &&
|
|
|
|
longVariable &&
|
|
|
|
longVariable;
|
2017-03-15 19:45:40 +03:00
|
|
|
const x =
|
|
|
|
(longVariable && longVariable) ||
|
2017-02-23 20:27:00 +03:00
|
|
|
(longVariable && longVariable) ||
|
|
|
|
(longVariable && longVariable);
|
2017-05-12 17:48:03 +03:00
|
|
|
const x =
|
|
|
|
firstItemWithAVeryLongNameThatKeepsGoing ||
|
|
|
|
firstItemWithAVeryLongNameThatKeepsGoing ||
|
|
|
|
{};
|
|
|
|
const x =
|
|
|
|
firstItemWithAVeryLongNameThatKeepsGoing ||
|
|
|
|
firstItemWithAVeryLongNameThatKeepsGoing ||
|
|
|
|
[];
|
|
|
|
const x =
|
|
|
|
call(
|
|
|
|
firstItemWithAVeryLongNameThatKeepsGoing,
|
|
|
|
firstItemWithAVeryLongNameThatKeepsGoing
|
|
|
|
) || [];
|
2017-01-25 01:35:37 +03:00
|
|
|
|
2017-03-15 19:45:40 +03:00
|
|
|
const x =
|
|
|
|
longVariable * longint && longVariable >> 0 && longVariable + longVariable;
|
2017-01-25 01:35:37 +03:00
|
|
|
|
2017-03-15 19:45:40 +03:00
|
|
|
const x =
|
|
|
|
longVariable > longint && longVariable === 0 + longVariable * longVariable;
|
2017-01-25 01:35:37 +03:00
|
|
|
|
|
|
|
foo(
|
|
|
|
obj.property * new Class() && obj instanceof Class && longVariable
|
|
|
|
? number + 5
|
|
|
|
: false
|
|
|
|
);
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2017-01-25 01:35:37 +03:00
|
|
|
`;
|
2017-05-26 02:26:34 +03:00
|
|
|
|
2018-07-03 09:06:29 +03:00
|
|
|
exports[`unary.js - flow-verify 1`] = `
|
2017-05-26 02:26:34 +03:00
|
|
|
const anyTestFailures = !(
|
|
|
|
aggregatedResults.numFailedTests === 0 &&
|
|
|
|
aggregatedResults.numRuntimeErrorTestSuites === 0
|
|
|
|
);
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
const anyTestFailures = !(
|
|
|
|
aggregatedResults.numFailedTests === 0 &&
|
|
|
|
aggregatedResults.numRuntimeErrorTestSuites === 0
|
|
|
|
);
|
|
|
|
|
|
|
|
`;
|