-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
With the following settings:
"struct.separator": " : ",
"struct.padding": true,
"struct.empty_padding": false,
"struct.multiline.leading_comma": false,
"struct.multiline.leading_comma.padding": true,
"struct.multiline.element_count": 2,
"struct.multiline.min_length": 60,
The following block of code:
hyper
.fake( {
"https://mydomain.com/auth" : (
newFakeResponse,
req
) => {
var body = req.getBody();
if ( body.User != "valid_user" || body.Secret != "valid_secret" ) {
return newFakeResponse( 401, "Unauthorized" );
}
return newFakeResponse(
200,
"Created",
serializeJSON( {
"token" : "valid_token",
"expiration" : dateAdd( "d", 1, now() )
} )
);
},
...
} );
ends up being formatted ( note the change of the var body = req.getBody(); to var body : req.getBody(); ):
hyper
.fake(
{
"https://mydomain.com/auth" : (
newFakeResponse,
req
) => {
var body : req.getBody();
if ( body.User ! : "valid_user" || body.Secret != "valid_secret" ) {
return newFakeResponse( 401,
"Unauthorized" );
}
returnnewFakeResponse(
200,
"Created",
serializeJSON( {
"token" : "valid_token",
"expiration" : dateAdd( "d", 1, now() )
} )
);
},
...
});
This seems to happen on OSX but not on Linux. I have not tested on Windows. Once the replacement of = to the : is made, then all of the formatting afterwards is also messed up. This happens on all versions from 0.16.x and up.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels