2017-02-22 00:59:19 +03:00
// Jest Snapshot v1, https://goo.gl/fbAQLP
2018-11-25 11:21:14 +03:00
exports[`bracket_0.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-05-02 00:41:34 +03:00
function a() {
function b() {
queryThenMutateDOM(
() => {
title = SomeThing.call(root, 'someLongStringThatPushesThisTextReallyFar')[0];
}
);
}
}
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-05-02 00:41:34 +03:00
function a() {
function b() {
queryThenMutateDOM(() => {
title = SomeThing.call(
root,
"someLongStringThatPushesThisTextReallyFar"
)[0];
});
}
}
2018-11-25 11:21:14 +03:00
================================================================================
2017-05-02 00:41:34 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`break-last-call.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-04-12 23:41:51 +03:00
export default store => {
2017-01-31 23:32:42 +03:00
return callApi(endpoint, schema).then(
response => next(actionWith({
response,
type: successType
})),
error => next(actionWith({
type: failureType,
2017-02-22 00:59:19 +03:00
error: error.message || 'Something bad happened'
2017-01-31 23:32:42 +03:00
}))
)
}
2017-02-22 00:59:19 +03:00
it('should group messages with same created time', () => {
2017-01-31 23:32:42 +03:00
expect(
groupMessages(messages).toJS(),
).toEqual({
2017-02-22 00:59:19 +03:00
'11/01/2017 13:36': [
{message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'},
{message: 'test', messageType: 'Email', status: 'Unknown', created: '11/01/2017 13:36'},
2017-01-31 23:32:42 +03:00
],
2017-02-22 00:59:19 +03:00
'09/01/2017 17:25': [
{message: 'te', messageType: 'SMS', status: 'Unknown', created: '09/01/2017 17:25'},
{message: 'te', messageType: 'Email', status: 'Unknown', created: '09/01/2017 17:25'},
2017-01-31 23:32:42 +03:00
],
2017-02-22 00:59:19 +03:00
'11/01/2017 13:33': [
{message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:33'},
{message: 'test', messageType: 'Email', status: 'Unknown', created: '11/01/2017 13:33'},
2017-01-31 23:32:42 +03:00
],
2017-02-22 00:59:19 +03:00
'11/01/2017 13:37': [
{message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:37'},
{message: 'test', messageType: 'Email', status: 'Unknown', created: '11/01/2017 13:37'},
2017-01-31 23:32:42 +03:00
],
});
});
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-01-31 23:32:42 +03:00
export default store => {
return callApi(endpoint, schema).then(
2017-03-09 20:08:12 +03:00
response =>
next(
actionWith({
response,
type: successType
})
),
error =>
next(
actionWith({
type: failureType,
2017-04-12 23:41:51 +03:00
error: error.message || "Something bad happened"
2017-03-09 20:08:12 +03:00
})
)
2017-01-31 23:32:42 +03:00
);
};
2017-04-12 23:41:51 +03:00
it("should group messages with same created time", () => {
2017-01-31 23:32:42 +03:00
expect(groupMessages(messages).toJS()).toEqual({
2017-04-12 23:41:51 +03:00
"11/01/2017 13:36": [
2017-01-31 23:32:42 +03:00
{
2017-04-12 23:41:51 +03:00
message: "test",
messageType: "SMS",
status: "Unknown",
created: "11/01/2017 13:36"
2017-01-31 23:32:42 +03:00
},
{
2017-04-12 23:41:51 +03:00
message: "test",
messageType: "Email",
status: "Unknown",
created: "11/01/2017 13:36"
2017-01-31 23:32:42 +03:00
}
],
2017-04-12 23:41:51 +03:00
"09/01/2017 17:25": [
2017-01-31 23:32:42 +03:00
{
2017-04-12 23:41:51 +03:00
message: "te",
messageType: "SMS",
status: "Unknown",
created: "09/01/2017 17:25"
2017-01-31 23:32:42 +03:00
},
{
2017-04-12 23:41:51 +03:00
message: "te",
messageType: "Email",
status: "Unknown",
created: "09/01/2017 17:25"
2017-01-31 23:32:42 +03:00
}
],
2017-04-12 23:41:51 +03:00
"11/01/2017 13:33": [
2017-01-31 23:32:42 +03:00
{
2017-04-12 23:41:51 +03:00
message: "test",
messageType: "SMS",
status: "Unknown",
created: "11/01/2017 13:33"
2017-01-31 23:32:42 +03:00
},
{
2017-04-12 23:41:51 +03:00
message: "test",
messageType: "Email",
status: "Unknown",
created: "11/01/2017 13:33"
2017-01-31 23:32:42 +03:00
}
],
2017-04-12 23:41:51 +03:00
"11/01/2017 13:37": [
2017-01-31 23:32:42 +03:00
{
2017-04-12 23:41:51 +03:00
message: "test",
messageType: "SMS",
status: "Unknown",
created: "11/01/2017 13:37"
2017-01-31 23:32:42 +03:00
},
{
2017-04-12 23:41:51 +03:00
message: "test",
messageType: "Email",
status: "Unknown",
created: "11/01/2017 13:37"
2017-01-31 23:32:42 +03:00
}
]
});
});
2017-04-12 23:41:51 +03:00
2018-11-25 11:21:14 +03:00
================================================================================
2017-01-31 23:32:42 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`break-last-member.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-04-12 23:41:51 +03:00
SomeVeryLongUpperCaseConstant.someVeryLongCallExpression().some_very_long_member_expression
2017-04-11 21:37:35 +03:00
weNeedToReachTheEightyCharacterLimitXXXXXXXXXXXXXXXXX.someNode
.childrenInAnArray[0];
superSupersuperSupersuperSupersuperSupersuperSuperLong.exampleOfOrderOfGetterAndSetterReordered;
superSupersuperSupersuperSupersuperSupersuperSuperLong.exampleOfOrderOfGetterAndSetterReordered[0];
expect(
findDOMNode(component.instance()).getElementsByClassName(styles.inner)[0].style.paddingRight
).toBe('1000px');
2017-04-14 03:09:00 +03:00
const { course, conflicts = [], index, scheduleId, studentId, something } = a.this.props;
const { course, conflicts = [], index, scheduleId, studentId, something } = this.props;
const {
updated,
author: { identifier: ownerId },
location,
category: categories,
} = rawAd.entry;
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-04-11 21:37:35 +03:00
SomeVeryLongUpperCaseConstant.someVeryLongCallExpression()
.some_very_long_member_expression;
weNeedToReachTheEightyCharacterLimitXXXXXXXXXXXXXXXXX.someNode
.childrenInAnArray[0];
superSupersuperSupersuperSupersuperSupersuperSuperLong.exampleOfOrderOfGetterAndSetterReordered;
superSupersuperSupersuperSupersuperSupersuperSuperLong
.exampleOfOrderOfGetterAndSetterReordered[0];
expect(
findDOMNode(component.instance()).getElementsByClassName(styles.inner)[0]
.style.paddingRight
2017-04-12 23:41:51 +03:00
).toBe("1000px");
2017-04-14 03:09:00 +03:00
const {
course,
conflicts = [],
index,
scheduleId,
studentId,
something
} = a.this.props;
const {
course,
conflicts = [],
index,
scheduleId,
studentId,
something
} = this.props;
const {
updated,
author: { identifier: ownerId },
location,
category: categories
} = rawAd.entry;
2018-11-25 11:21:14 +03:00
================================================================================
2017-04-11 21:37:35 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`break-multiple.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-08-27 19:44:44 +03:00
object.foo().bar().baz();
foo().bar().baz();
foo().bar.baz();
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-08-27 19:44:44 +03:00
object
.foo()
.bar()
.baz();
foo()
.bar()
.baz();
foo().bar.baz();
2018-11-25 11:21:14 +03:00
================================================================================
2017-08-27 19:44:44 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`comment.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-04-12 23:41:51 +03:00
function f() {
2017-02-13 20:05:18 +03:00
return observableFromSubscribeFunction()
// Debounce manually rather than using editor.onDidStopChanging so that the debounce time is
// configurable.
.debounceTime(debounceInterval);
}
2017-03-20 19:32:49 +03:00
_.a(a)
/* very very very very very very very long such that it is longer than 80 columns */
.a()
_.a(
a
)/* very very very very very very very long such that it is longer than 80 columns */
.a();
_.a(
a
) /* very very very very very very very long such that it is longer than 80 columns */.a();
2017-04-13 03:26:58 +03:00
Something
// $FlowFixMe(>=0.41.0)
.getInstance(this.props.dao)
.getters()
2017-05-23 23:14:13 +03:00
// Warm-up first
measure()
.then(() => {
SomethingLong();
});
measure() // Warm-up first
.then(() => {
SomethingLong();
});
2017-05-23 23:58:52 +03:00
const configModel = this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify)
.merge(this.cachedWorkspaceConfig);
2017-05-24 02:31:10 +03:00
this.doWriteConfiguration(target, value, options) // queue up writes to prevent race conditions
.then(() => null,
error => {
return options.donotNotifyError ? TPromise.wrapError(error) : this.onError(error, target, value);
});
2017-06-03 01:50:43 +03:00
ret = __DEV__ ?
// $FlowFixMe: this type differs according to the env
vm.runInContext(source, ctx)
: a
2017-06-08 01:20:11 +03:00
this.firebase.object(\`/shops/\${shopLocation.shop}\`)
// keep distance info
.first((shop: ShopQueryResult, index: number, source: Observable<ShopQueryResult>): any => {
// add distance to result
const s = shop;
s.distance = shopLocation.distance;
return s;
});
angular.module('AngularAppModule')
// Hello, I am comment.
.constant('API_URL', 'http://localhost:8080/api');
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-02-13 20:05:18 +03:00
function f() {
2017-03-09 04:06:18 +03:00
return (
observableFromSubscribeFunction()
// Debounce manually rather than using editor.onDidStopChanging so that the debounce time is
// configurable.
.debounceTime(debounceInterval)
);
2017-02-13 20:05:18 +03:00
}
2017-03-20 19:32:49 +03:00
_.a(a)
/* very very very very very very very long such that it is longer than 80 columns */
.a();
_.a(
a
2017-05-24 02:31:10 +03:00
) /* very very very very very very very long such that it is longer than 80 columns */
.a();
2017-03-20 19:32:49 +03:00
_.a(
a
2017-05-24 02:31:10 +03:00
) /* very very very very very very very long such that it is longer than 80 columns */
.a();
2017-04-12 23:41:51 +03:00
2017-04-13 03:26:58 +03:00
Something
// $FlowFixMe(>=0.41.0)
.getInstance(this.props.dao)
.getters();
2017-05-23 23:14:13 +03:00
// Warm-up first
measure().then(() => {
SomethingLong();
});
measure() // Warm-up first
.then(() => {
SomethingLong();
});
2017-05-23 23:58:52 +03:00
const configModel = this.baseConfigurationService
.getCache()
.consolidated // global/default values (do NOT modify)
.merge(this.cachedWorkspaceConfig);
2017-05-24 02:31:10 +03:00
this.doWriteConfiguration(target, value, options) // queue up writes to prevent race conditions
.then(
() => null,
error => {
return options.donotNotifyError
? TPromise.wrapError(error)
: this.onError(error, target, value);
}
);
2017-06-03 01:50:43 +03:00
ret = __DEV__
? // $FlowFixMe: this type differs according to the env
vm.runInContext(source, ctx)
: a;
2017-06-08 01:20:11 +03:00
this.firebase
.object(\`/shops/\${shopLocation.shop}\`)
// keep distance info
.first(
(
shop: ShopQueryResult,
index: number,
source: Observable<ShopQueryResult>
): any => {
// add distance to result
const s = shop;
s.distance = shopLocation.distance;
return s;
}
);
angular
.module("AngularAppModule")
// Hello, I am comment.
.constant("API_URL", "http://localhost:8080/api");
2018-11-25 11:21:14 +03:00
================================================================================
2017-02-13 20:05:18 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`computed.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-06-10 17:47:22 +03:00
nock(/test/)
.matchHeader('Accept', 'application/json')
[httpMethodNock(method)]('/foo')
.reply(200, {
foo: 'bar',
});
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-06-10 17:47:22 +03:00
nock(/test/)
.matchHeader("Accept", "application/json")
[httpMethodNock(method)]("/foo")
.reply(200, {
foo: "bar"
});
2018-11-25 11:21:14 +03:00
================================================================================
2017-06-10 17:47:22 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`computed-merge.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-08-26 15:35:05 +03:00
[].forEach(key => {
data[key]('foo')
.then(() => console.log('bar'))
.catch(() => console.log('baz'));
});
[].forEach(key => {
data('foo')
[key]('bar')
.then(() => console.log('bar'))
.catch(() => console.log('baz'));
});
2017-10-27 19:05:40 +03:00
window.Data[key]("foo")
.then(() => a)
.catch(() => b);
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-08-26 15:35:05 +03:00
[].forEach(key => {
data[key]("foo")
.then(() => console.log("bar"))
.catch(() => console.log("baz"));
});
[].forEach(key => {
data("foo")
[key]("bar")
.then(() => console.log("bar"))
.catch(() => console.log("baz"));
});
2017-10-27 19:05:40 +03:00
window.Data[key]("foo")
.then(() => a)
.catch(() => b);
2018-11-25 11:21:14 +03:00
================================================================================
2017-08-26 15:35:05 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`conditional.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-09-10 22:09:21 +03:00
(a ? b : c).d();
(a ? b : c).d().e();
(a ? b : c).d().e().f();
2017-09-10 18:34:55 +03:00
(valid
? helper.responseBody(this.currentUser)
2017-09-10 22:09:21 +03:00
: helper.responseBody(this.defaultUser))
.map();
(valid
? helper.responseBody(this.currentUser)
: helper.responseBody(this.defaultUser))
.map().filter();
2017-09-10 18:34:55 +03:00
(valid
? helper.responseBody(this.currentUser)
: helper.responseBody(defaultUser))
2017-09-10 22:09:21 +03:00
.map();
object[valid
? helper.responseBody(this.currentUser)
: helper.responseBody(defaultUser)]
.map();
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-09-10 22:09:21 +03:00
(a ? b : c).d();
(a ? b : c).d().e();
(a ? b : c)
.d()
.e()
.f();
2017-09-10 18:34:55 +03:00
(valid
? helper.responseBody(this.currentUser)
2017-09-10 22:09:21 +03:00
: helper.responseBody(this.defaultUser)
).map();
(valid
? helper.responseBody(this.currentUser)
: helper.responseBody(this.defaultUser)
)
.map()
.filter();
(valid
? helper.responseBody(this.currentUser)
: helper.responseBody(defaultUser)
).map();
object[
valid
? helper.responseBody(this.currentUser)
: helper.responseBody(defaultUser)
].map();
2017-09-10 18:34:55 +03:00
2018-11-25 11:21:14 +03:00
================================================================================
2017-09-10 18:34:55 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`d3.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2018-04-24 13:54:45 +03:00
d3.select('body')
.append('circle')
.at({ width: 30, fill: '#f0f' })
.st({ fontWeight: 600 })
d3.scaleLinear()
.domain([1950, 1980])
.range([0, width])
2018-05-28 03:52:42 +03:00
not.d3.select('body')
.append('circle')
.at({ width: 30, fill: '#f0f' })
.st({ fontWeight: 600 })
not.d3.scaleLinear()
.domain([1950, 1980])
.range([0, width])
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2018-04-24 13:54:45 +03:00
d3.select("body")
.append("circle")
.at({ width: 30, fill: "#f0f" })
.st({ fontWeight: 600 });
d3.scaleLinear()
.domain([1950, 1980])
.range([0, width]);
2018-05-28 03:52:42 +03:00
not.d3
.select("body")
.append("circle")
.at({ width: 30, fill: "#f0f" })
.st({ fontWeight: 600 });
not.d3
.scaleLinear()
.domain([1950, 1980])
.range([0, width]);
2018-11-25 11:21:14 +03:00
================================================================================
2018-04-24 13:54:45 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`first_long.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-04-12 23:41:51 +03:00
export default function theFunction(action$, store) {
2017-02-13 18:07:33 +03:00
return action$.ofType(THE_ACTION).switchMap(action => Observable
.webSocket({
url: THE_URL,
more: stuff(),
evenMore: stuff({
value1: true,
value2: false,
value3: false
})
})
.filter(data => theFilter(data))
.map(({ theType, ...data }) => theMap(theType, data))
.retryWhen(errors => errors));
}
2017-02-23 17:41:44 +03:00
function f() {
return this._getWorker(workerOptions)({
filePath,
hasteImplModulePath: this._options.hasteImplModulePath,
}).then(
metadata => {
// \`1\` for truthy values instead of \`true\` to save cache space.
fileMetadata[H.VISITED] = 1;
const metadataId = metadata.id;
const metadataModule = metadata.module;
if (metadataId && metadataModule) {
fileMetadata[H.ID] = metadataId;
setModule(metadataId, metadataModule);
}
fileMetadata[H.DEPENDENCIES] = metadata.dependencies || [];
}
);
}
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-02-13 18:07:33 +03:00
export default function theFunction(action$, store) {
2017-03-09 20:08:12 +03:00
return action$.ofType(THE_ACTION).switchMap(action =>
Observable.webSocket({
url: THE_URL,
more: stuff(),
evenMore: stuff({
value1: true,
value2: false,
value3: false
})
2017-02-13 18:07:33 +03:00
})
2017-03-09 20:08:12 +03:00
.filter(data => theFilter(data))
.map(({ theType, ...data }) => theMap(theType, data))
2017-04-11 18:50:49 +03:00
.retryWhen(errors => errors)
);
2017-02-13 18:07:33 +03:00
}
2017-02-23 17:41:44 +03:00
function f() {
return this._getWorker(workerOptions)({
2017-02-28 18:55:32 +03:00
filePath,
hasteImplModulePath: this._options.hasteImplModulePath
}).then(metadata => {
// \`1\` for truthy values instead of \`true\` to save cache space.
fileMetadata[H.VISITED] = 1;
const metadataId = metadata.id;
const metadataModule = metadata.module;
if (metadataId && metadataModule) {
fileMetadata[H.ID] = metadataId;
setModule(metadataId, metadataModule);
}
fileMetadata[H.DEPENDENCIES] = metadata.dependencies || [];
});
2017-02-23 17:41:44 +03:00
}
2017-04-12 23:41:51 +03:00
2018-11-25 11:21:14 +03:00
================================================================================
2017-02-13 18:07:33 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`inline_merge.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-04-12 23:41:51 +03:00
Object.keys(
2017-02-28 18:55:32 +03:00
availableLocales({
test: true
})
)
.forEach(locale => {
// ...
});
2018-06-01 18:51:06 +03:00
this.layoutPartsToHide = this.utils.hashset(
_.flatMap(this.visibilityHandlers, fn => fn())
.concat(this.record.resolved_legacy_visrules)
.filter(Boolean)
);
var jqxhr = $.ajax("example.php")
.done(doneFn)
.fail(failFn);
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-02-28 18:55:32 +03:00
Object.keys(
availableLocales({
test: true
})
).forEach(locale => {
// ...
});
2017-04-12 23:41:51 +03:00
2018-06-01 18:51:06 +03:00
this.layoutPartsToHide = this.utils.hashset(
_.flatMap(this.visibilityHandlers, fn => fn())
.concat(this.record.resolved_legacy_visrules)
.filter(Boolean)
);
var jqxhr = $.ajax("example.php")
.done(doneFn)
.fail(failFn);
2018-11-25 11:21:14 +03:00
================================================================================
2017-02-28 18:55:32 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`logical.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-10-23 02:29:13 +03:00
const someLongVariableName = (idx(
this.props,
props => props.someLongPropertyName
) || []
).map(edge => edge.node);
2017-04-12 23:41:51 +03:00
(veryLongVeryLongVeryLong || e).map(tickets =>
2017-02-28 20:31:04 +03:00
TicketRecord.createFromSomeLongString());
2017-09-10 22:55:00 +03:00
(veryLongVeryLongVeryLong || e).map(tickets =>
TicketRecord.createFromSomeLongString()).filter(obj => !!obj);
(veryLongVeryLongVeryLong || anotherVeryLongVeryLongVeryLong || veryVeryVeryLongError).map(tickets =>
TicketRecord.createFromSomeLongString());
(veryLongVeryLongVeryLong || anotherVeryLongVeryLongVeryLong || veryVeryVeryLongError).map(tickets =>
TicketRecord.createFromSomeLongString()).filter(obj => !!obj);
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-10-23 02:29:13 +03:00
const someLongVariableName = (
idx(this.props, props => props.someLongPropertyName) || []
).map(edge => edge.node);
2017-09-10 22:55:00 +03:00
(veryLongVeryLongVeryLong || e).map(tickets =>
TicketRecord.createFromSomeLongString()
);
2017-02-28 20:31:04 +03:00
(veryLongVeryLongVeryLong || e)
2017-09-10 22:55:00 +03:00
.map(tickets => TicketRecord.createFromSomeLongString())
.filter(obj => !!obj);
2017-10-23 02:29:13 +03:00
(
veryLongVeryLongVeryLong ||
2017-09-10 22:55:00 +03:00
anotherVeryLongVeryLongVeryLong ||
veryVeryVeryLongError
).map(tickets => TicketRecord.createFromSomeLongString());
2017-10-23 02:29:13 +03:00
(
veryLongVeryLongVeryLong ||
2017-09-10 22:55:00 +03:00
anotherVeryLongVeryLongVeryLong ||
veryVeryVeryLongError
)
.map(tickets => TicketRecord.createFromSomeLongString())
.filter(obj => !!obj);
2017-04-12 23:41:51 +03:00
2018-11-25 11:21:14 +03:00
================================================================================
2017-02-28 20:31:04 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`multiple-members.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-04-12 23:41:51 +03:00
if (testConfig.ENABLE_ONLINE_TESTS === "true") {
describe("POST /users/me/pet", function() {
it("saves pet", function() {
2017-01-31 23:32:42 +03:00
function assert(pet) {
2017-04-12 23:41:51 +03:00
expect(pet).to.have.property("OwnerAddress").that.deep.equals({
AddressLine1: "Alexanderstrasse",
AddressLine2: "",
PostalCode: "10999",
Region: "Berlin",
City: "Berlin",
Country: "DE"
2017-01-31 23:32:42 +03:00
});
}
});
});
}
2017-10-08 04:12:17 +03:00
wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName')().then(function() {
doSomething();
});
wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName')('argument').then(function() {
doSomething();
});
wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName', 'second argument that pushes this group past 80 characters')('argument').then(function() {
doSomething();
});
wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName')('argument', 'second argument that pushes this group past 80 characters').then(function() {
doSomething();
});
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-04-12 23:41:51 +03:00
if (testConfig.ENABLE_ONLINE_TESTS === "true") {
describe("POST /users/me/pet", function() {
it("saves pet", function() {
2017-01-31 23:32:42 +03:00
function assert(pet) {
2017-08-27 19:44:44 +03:00
expect(pet)
.to.have.property("OwnerAddress")
.that.deep.equals({
AddressLine1: "Alexanderstrasse",
AddressLine2: "",
PostalCode: "10999",
Region: "Berlin",
City: "Berlin",
Country: "DE"
});
2017-01-31 23:32:42 +03:00
}
});
});
}
2017-04-12 23:41:51 +03:00
2017-10-08 04:12:17 +03:00
wrapper
.find("SomewhatLongNodeName")
.prop("longPropFunctionName")()
.then(function() {
doSomething();
});
wrapper
.find("SomewhatLongNodeName")
.prop("longPropFunctionName")("argument")
.then(function() {
doSomething();
});
wrapper
.find("SomewhatLongNodeName")
.prop(
"longPropFunctionName",
"second argument that pushes this group past 80 characters"
)("argument")
.then(function() {
doSomething();
});
wrapper
.find("SomewhatLongNodeName")
.prop("longPropFunctionName")(
"argument",
"second argument that pushes this group past 80 characters"
)
.then(function() {
doSomething();
});
2018-11-25 11:21:14 +03:00
================================================================================
2017-01-31 23:32:42 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`short-names.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2018-05-19 03:44:15 +03:00
const svgJsFiles = fs
.readdirSync(svgDir)
.filter(f => svgJsFileExtRegex.test(f))
.map(f => path.join(svgDir, f));
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2018-05-19 03:44:15 +03:00
const svgJsFiles = fs
.readdirSync(svgDir)
.filter(f => svgJsFileExtRegex.test(f))
.map(f => path.join(svgDir, f));
2018-11-25 11:21:14 +03:00
================================================================================
2018-05-19 03:44:15 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`square_0.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-04-12 23:41:51 +03:00
const version = someLongString
2017-02-23 18:34:52 +03:00
.split('jest version =')
.pop()
.split(EOL)[0]
.trim();
2017-11-02 15:35:34 +03:00
const component = find('.org-lclp-edit-copy-url-banner__link')[0]
.getAttribute('href')
.indexOf(this.landingPageLink);
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-02-23 18:34:52 +03:00
const version = someLongString
2017-04-12 23:41:51 +03:00
.split("jest version =")
2017-02-23 18:34:52 +03:00
.pop()
.split(EOL)[0]
.trim();
2017-04-12 23:41:51 +03:00
2017-11-02 15:35:34 +03:00
const component = find(".org-lclp-edit-copy-url-banner__link")[0]
.getAttribute("href")
.indexOf(this.landingPageLink);
2018-11-25 11:21:14 +03:00
================================================================================
2017-02-23 18:34:52 +03:00
`;
2018-11-25 11:21:14 +03:00
exports[`test.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-04-12 23:41:51 +03:00
method().then(x => x)
["abc"](x => x)
2017-01-25 01:35:37 +03:00
[abc](x => x);
({}.a().b());
({}).a().b();
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-08-27 19:44:44 +03:00
method()
.then(x => x)
["abc"](x => x)
[abc](x => x);
2017-01-25 01:35:37 +03:00
2017-03-08 00:24:47 +03:00
({}.a().b());
({}.a().b());
2017-04-12 23:41:51 +03:00
2018-11-25 11:21:14 +03:00
================================================================================
2017-01-25 01:35:37 +03:00
`;
2017-02-04 00:18:54 +03:00
2018-11-25 11:21:14 +03:00
exports[`this.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
2017-04-12 23:41:51 +03:00
const sel = this.connections
2017-02-04 00:18:54 +03:00
.concat(this.activities.concat(this.operators))
.filter(x => x.selected);
2018-11-25 11:21:14 +03:00
=====================================output=====================================
2017-02-04 00:18:54 +03:00
const sel = this.connections
.concat(this.activities.concat(this.operators))
.filter(x => x.selected);
2017-04-12 23:41:51 +03:00
2018-11-25 11:21:14 +03:00
================================================================================
2017-02-04 00:18:54 +03:00
`;