Add on to prettier with pretty-quick

Pretty-quick will only format files that have been changed since the last commit.
This commit is contained in:
Dmitry Yankowski
2020-02-25 03:59:48 -05:00
parent f846cf32fd
commit d39b190788
4 changed files with 203 additions and 16 deletions

View File

@@ -1,21 +1,26 @@
describe('Proxy disabled - local request', () => {
it('Change default url with query and make a request to local cat api', () => {
cy.seedAndVisit('catapi', '/?url=https://api.thecatapi.com&path=')
.get('#url').then((el) => expect(el.val() === 'https://api.thecatapi.com').to.equal(true))
.get("#path").then((el) => expect(el.val() === '').to.equal(true))
.get('#response-details-wrapper').should($wrapper => {
expect($wrapper).to.contain('FAKE Cat API')
describe("Proxy disabled - local request", () => {
it("Change default url with query and make a request to local cat api", () => {
cy.seedAndVisit("catapi", "/?url=https://api.thecatapi.com&path=")
.get("#url")
.then(el => expect(el.val() === "https://api.thecatapi.com").to.equal(true))
.get("#path")
.then(el => expect(el.val() === "").to.equal(true))
.get("#response-details-wrapper")
.should($wrapper => {
expect($wrapper).to.contain("FAKE Cat API")
})
})
})
describe('Proxy enabled - external request', () => {
it('Enable the proxy and make a request to the real cat api', () => {
cy.enableProxy('/?url=https://api.thecatapi.com&path=')
.get('#send').click()
describe("Proxy enabled - external request", () => {
it("Enable the proxy and make a request to the real cat api", () => {
cy.enableProxy("/?url=https://api.thecatapi.com&path=")
.get("#send")
.click()
.wait(500)
.get('#response-details-wrapper').should($wrapper => {
expect($wrapper).to.contain('Cat API')
.get("#response-details-wrapper")
.should($wrapper => {
expect($wrapper).to.contain("Cat API")
})
})
})
})