Skip to content

Instantly share code, notes, and snippets.

@nemrosim
Last active April 21, 2021 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nemrosim/b3e38bc97e54eb86c8e7da71e81bfc3a to your computer and use it in GitHub Desktop.
Save nemrosim/b3e38bc97e54eb86c8e7da71e81bfc3a to your computer and use it in GitHub Desktop.
> {%
client.test("Request executed successfully", function() {
client.assert(response.status === 200, "Response status is not 200");
});
client.test("Headers option exists", function() {
const {body} = response;
client.assert(body.hasOwnProperty('PropertyName'), "No 'PropertyName' in response");
});
client.test("Response content-type is json", function() {
var type = response.contentType.mimeType;
client.assert(type === "application/json", "Expected 'application/json' but received '" + type + "'");
});
%}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment