267 lines
5.2 KiB
Plaintext
267 lines
5.2 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`arrow.js 1`] = `
|
|
"export default function searchUsers(action$) {
|
|
return action$.ofType(ActionTypes.SEARCHED_USERS)
|
|
.map(action => action.payload.query)
|
|
.filter(q => !!q)
|
|
.switchMap(q =>
|
|
Observable.timer(800) // debounce
|
|
.takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS))
|
|
.mergeMap(() => Observable.merge(
|
|
Observable.of(replace(\`?q=\${q}\`)),
|
|
ajax.getJSON(\`https://api.github.com/search/users?q=\${q}\`)
|
|
.map(res => res.items)
|
|
.map(receiveUsers)
|
|
))
|
|
);
|
|
};
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
export default function searchUsers(action$) {
|
|
return action$
|
|
.ofType(ActionTypes.SEARCHED_USERS)
|
|
.map(action => action.payload.query)
|
|
.filter(q => !!q)
|
|
.switchMap(q =>
|
|
Observable.timer(800) // debounce
|
|
.takeUntil(action$.ofType(ActionTypes.CLEARED_SEARCH_RESULTS))
|
|
.mergeMap(() =>
|
|
Observable.merge(
|
|
Observable.of(replace(\`?q=\${q}\`)),
|
|
ajax
|
|
.getJSON(\`https://api.github.com/search/users?q=\${q}\`)
|
|
.map(res => res.items)
|
|
.map(receiveUsers)
|
|
)));
|
|
}
|
|
"
|
|
`;
|
|
|
|
exports[`break-parent.js 1`] = `
|
|
"({
|
|
processors: [
|
|
require(\\"autoprefixer\\", {
|
|
browsers: [\\"> 1%\\", \\"last 2 versions\\", \\"ie >= 11\\", \\"Firefox ESR\\"]
|
|
}),
|
|
require(\\"postcss-url\\")({
|
|
url: url =>
|
|
url.startsWith(\\"/\\") || /^[a-z]+:/.test(url) ? url : \`/static/\${url}\`
|
|
})
|
|
]
|
|
});
|
|
|
|
true
|
|
? test({
|
|
a: 1
|
|
})
|
|
: <div
|
|
a={123412342314}
|
|
b={123412341234}
|
|
c={123412341234}
|
|
d={123412341234}
|
|
e={123412341234}
|
|
f={123412341234}
|
|
g={123412341234}
|
|
/>;
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
({
|
|
processors: [
|
|
require(\\"autoprefixer\\", {
|
|
browsers: [\\"> 1%\\", \\"last 2 versions\\", \\"ie >= 11\\", \\"Firefox ESR\\"]
|
|
}),
|
|
require(\\"postcss-url\\")({
|
|
url: url =>
|
|
url.startsWith(\\"/\\") || /^[a-z]+:/.test(url) ? url : \`/static/\${url}\`
|
|
})
|
|
]
|
|
});
|
|
|
|
true
|
|
? test({
|
|
a: 1
|
|
})
|
|
: <div
|
|
a={123412342314}
|
|
b={123412341234}
|
|
c={123412341234}
|
|
d={123412341234}
|
|
e={123412341234}
|
|
f={123412341234}
|
|
g={123412341234}
|
|
/>;
|
|
"
|
|
`;
|
|
|
|
exports[`jsx.js 1`] = `
|
|
"const els = items.map(item => (
|
|
<div className=\\"whatever\\">
|
|
<span>{children}</span>
|
|
</div>
|
|
));
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
const els = items.map(item => (
|
|
<div className=\\"whatever\\">
|
|
<span>{children}</span>
|
|
</div>
|
|
));
|
|
"
|
|
`;
|
|
|
|
exports[`object.js 1`] = `
|
|
"const formatData = pipe(
|
|
zip,
|
|
map(([ ref, data ]) => ({
|
|
nodeId: ref.nodeId.toString(),
|
|
...attributeFromDataValue(ref.attributeId, data)
|
|
})),
|
|
groupBy(prop('nodeId')),
|
|
map(mergeAll),
|
|
values
|
|
);
|
|
|
|
export const setProp = y => ({
|
|
...y,
|
|
a: 'very, very, very long very, very long text'
|
|
});
|
|
|
|
export const log = y => {
|
|
console.log('very, very, very long very, very long text')
|
|
};
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
const formatData = pipe(
|
|
zip,
|
|
map(([ref, data]) => ({
|
|
nodeId: ref.nodeId.toString(),
|
|
...attributeFromDataValue(ref.attributeId, data)
|
|
})),
|
|
groupBy(prop(\\"nodeId\\")),
|
|
map(mergeAll),
|
|
values
|
|
);
|
|
|
|
export const setProp = y => ({
|
|
...y,
|
|
a: \\"very, very, very long very, very long text\\"
|
|
});
|
|
|
|
export const log = y => {
|
|
console.log(\\"very, very, very long very, very long text\\");
|
|
};
|
|
"
|
|
`;
|
|
|
|
exports[`overflow.js 1`] = `
|
|
"SuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLongCall((err, result) => {
|
|
// comment
|
|
});
|
|
|
|
func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, []);
|
|
func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, []);
|
|
func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, [
|
|
// Comments
|
|
]);
|
|
func(five, six, seven, eig, is, this, too, long, yes, [
|
|
// Comments
|
|
]);
|
|
|
|
func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, {});
|
|
func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, {});
|
|
func(one, two, three, four, five, six, seven, eig, is, this, too, long, yes, {
|
|
// Comments
|
|
});
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
SuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLongCall(
|
|
(err, result) => {
|
|
// comment
|
|
}
|
|
);
|
|
|
|
func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, []);
|
|
func(
|
|
one,
|
|
two,
|
|
three,
|
|
four,
|
|
five,
|
|
six,
|
|
seven,
|
|
eig,
|
|
is,
|
|
this,
|
|
too,
|
|
long,
|
|
yes,
|
|
[]
|
|
);
|
|
func(
|
|
one,
|
|
two,
|
|
three,
|
|
four,
|
|
five,
|
|
six,
|
|
seven,
|
|
eig,
|
|
is,
|
|
this,
|
|
too,
|
|
long,
|
|
yes,
|
|
[
|
|
// Comments
|
|
]
|
|
);
|
|
func(
|
|
five,
|
|
six,
|
|
seven,
|
|
eig,
|
|
is,
|
|
this,
|
|
too,
|
|
long,
|
|
yes,
|
|
[
|
|
// Comments
|
|
]
|
|
);
|
|
|
|
func(one, two, three, four, five, six, seven, eig, is, this, too, long, no, {});
|
|
func(
|
|
one,
|
|
two,
|
|
three,
|
|
four,
|
|
five,
|
|
six,
|
|
seven,
|
|
eig,
|
|
is,
|
|
this,
|
|
too,
|
|
long,
|
|
yes,
|
|
{}
|
|
);
|
|
func(
|
|
one,
|
|
two,
|
|
three,
|
|
four,
|
|
five,
|
|
six,
|
|
seven,
|
|
eig,
|
|
is,
|
|
this,
|
|
too,
|
|
long,
|
|
yes,
|
|
{
|
|
// Comments
|
|
}
|
|
);
|
|
"
|
|
`;
|