2017-01-31 23:32:42 +03:00
|
|
|
exports[`test break-last-call.js 1`] = `
|
|
|
|
"export default store => {
|
|
|
|
return callApi(endpoint, schema).then(
|
|
|
|
response => next(actionWith({
|
|
|
|
response,
|
|
|
|
type: successType
|
|
|
|
})),
|
|
|
|
error => next(actionWith({
|
|
|
|
type: failureType,
|
|
|
|
error: error.message || \'Something bad happened\'
|
|
|
|
}))
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
it(\'should group messages with same created time\', () => {
|
|
|
|
expect(
|
|
|
|
groupMessages(messages).toJS(),
|
|
|
|
).toEqual({
|
|
|
|
\'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\'},
|
|
|
|
],
|
|
|
|
\'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\'},
|
|
|
|
],
|
|
|
|
\'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\'},
|
|
|
|
],
|
|
|
|
\'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\'},
|
|
|
|
],
|
|
|
|
});
|
|
|
|
});
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
export default store => {
|
|
|
|
return callApi(endpoint, schema).then(
|
|
|
|
response => next(
|
|
|
|
actionWith({
|
|
|
|
response,
|
|
|
|
type: successType
|
|
|
|
})
|
|
|
|
),
|
|
|
|
error => next(
|
|
|
|
actionWith({
|
|
|
|
type: failureType,
|
|
|
|
error: error.message || \"Something bad happened\"
|
|
|
|
})
|
|
|
|
)
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
it(\"should group messages with same created time\", () => {
|
|
|
|
expect(groupMessages(messages).toJS()).toEqual({
|
|
|
|
\"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\"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
\"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\"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
\"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\"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
\"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\"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`test multiple-members.js 1`] = `
|
|
|
|
"if (testConfig.ENABLE_ONLINE_TESTS === \"true\") {
|
|
|
|
describe(\"POST /users/me/pet\", function() {
|
|
|
|
it(\"saves pet\", function() {
|
|
|
|
function assert(pet) {
|
|
|
|
expect(pet).to.have.property(\"OwnerAddress\").that.deep.equals({
|
|
|
|
AddressLine1: \"Alexanderstrasse\",
|
|
|
|
AddressLine2: \"\",
|
|
|
|
PostalCode: \"10999\",
|
|
|
|
Region: \"Berlin\",
|
|
|
|
City: \"Berlin\",
|
|
|
|
Country: \"DE\"
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
if (testConfig.ENABLE_ONLINE_TESTS === \"true\") {
|
|
|
|
describe(\"POST /users/me/pet\", function() {
|
|
|
|
it(\"saves pet\", function() {
|
|
|
|
function assert(pet) {
|
|
|
|
expect(pet).to.have.property(\"OwnerAddress\").that.deep.equals({
|
|
|
|
AddressLine1: \"Alexanderstrasse\",
|
|
|
|
AddressLine2: \"\",
|
|
|
|
PostalCode: \"10999\",
|
|
|
|
Region: \"Berlin\",
|
|
|
|
City: \"Berlin\",
|
|
|
|
Country: \"DE\"
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
"
|
|
|
|
`;
|
|
|
|
|
2017-01-25 01:35:37 +03:00
|
|
|
exports[`test test.js 1`] = `
|
|
|
|
"method().then(x => x)
|
|
|
|
[\"abc\"](x => x)
|
|
|
|
[abc](x => x);
|
|
|
|
|
|
|
|
({}.a().b());
|
|
|
|
({}).a().b();
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2017-01-31 23:32:42 +03:00
|
|
|
method().then(x => x)[\"abc\"](x => x)[abc](x => x);
|
2017-01-25 01:35:37 +03:00
|
|
|
|
|
|
|
({}).a().b();
|
|
|
|
({}).a().b();
|
|
|
|
"
|
|
|
|
`;
|