1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-31 06:18:07 +00:00
_/ts-openapi/cypress/integration/hello.js

20 lines
525 B
JavaScript
Raw Permalink Normal View History

2020-10-08 10:39:34 +09:00
/// <reference types="cypress" />
describe("Basic API checks", () => {
it("Should return a valid health payload", function () {
cy.request("/hello").then(($response) => {
cy.task("validateSwaggerSchema", {
file: "./openapi.json",
endpoint: "/hello",
method: "get",
statusCode: 200,
responseSchema: $response.body,
verbose: true,
}).should("deep.equal", {});
});
});
it("Get", function () {
cy.request("/hello").its("body").eq("hello");
});
});