Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('response has expected properties', t => {
const response = new Response(f.statusCode, f.headers, f.body, f.url);
t.is(response.statusCode, f.statusCode);
t.deepEqual(response.headers, lowercaseKeys(f.headers));
t.is(response.body, f.body);
t.is(response.url, f.url);
});
}, {});
} else {
try {
example.settings = JSON.parse(modifiers);
} catch (err) {
return {
error: `Cannot parse modifiers for "${modifiers}". Use space-separated strings or JSON:\n\n${DOCS_DOCUMENTING}`,
};
}
}
}
const updatedExample = updateExample(example);
return {
...updatedExample,
settings: lowercaseKeys(updatedExample.settings),
};
}