cleanup decaf

This commit is contained in:
Zach Bloomquist
2020-06-04 17:06:23 -04:00
parent 76ddf33561
commit 9ea49792d0
219 changed files with 226 additions and 1621 deletions

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
require('@percy/cypress')
require('cypress-react-unit-test/dist/hooks')

View File

@@ -1,5 +1,8 @@
{
"extends": [
"plugin:@cypress/dev/tests"
]
],
"globals": {
"sinon": true
}
}

View File

@@ -1,15 +1,3 @@
/* eslint-disable
brace-style,
no-undef,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
require('../spec_helper')
const _ = require('lodash')
const http = require('http')
@@ -178,7 +166,7 @@ describe('app/background', () => {
it('emits \'automation:push:request\'', (done) => {
const info = { cause: 'explicit', cookie: { name: 'foo', value: 'bar' } }
const addListener = sinon.stub(browser.cookies.onChanged, 'addListener').yieldsAsync(info)
sinon.stub(browser.cookies.onChanged, 'addListener').yieldsAsync(info)
const client = background.connect(`http://localhost:${PORT}`, '/__socket.io')
return client.on('connect', () => {
@@ -259,8 +247,8 @@ describe('app/background', () => {
})
.then(() => {
throw new Error('should have failed')
}).catch((err) => // we good if this hits
{
}).catch((err) => {
// we good if this hits
expect(err).to.be.instanceof(Promise.RangeError)
})
})
@@ -300,8 +288,8 @@ describe('app/background', () => {
})
.then(() => {
throw new Error('should have failed')
}).catch((err) => // we good if this hits
{
}).catch((err) => {
// we good if this hits
expect(err).to.be.instanceof(Promise.RangeError)
})
})

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const chai = require('chai')
const sinon = require('sinon')
const sinonChai = require('sinon-chai')

View File

@@ -1,21 +1,7 @@
/* eslint-disable
no-undef,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
require('../spec_helper')
let {
exec,
} = require('child_process')
let { exec } = require('child_process')
let fs = require('fs-extra')
const EE = require('events')
const eol = require('eol')
const path = require('path')
const Promise = require('bluebird')

View File

@@ -1,14 +1,5 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const { EventEmitter } = require('events')
const {
_,
} = Cypress
const { _ } = Cypress
const addLog = function (runner, log) {
const defaultLog = {
@@ -40,7 +31,7 @@ describe('aliases', () => {
})
})
return cy.get('.reporter').then(() => {
cy.get('.reporter').then(() => {
this.runner.emit('runnables:ready', this.runnables)
return this.runner.emit('reporter:start', {})
@@ -71,7 +62,7 @@ describe('aliases', () => {
})
it('has correct alias class', () => {
return cy.contains('.command-number', '1')
cy.contains('.command-number', '1')
.parent()
.find('.command-alias')
.should('have.class', 'route')
@@ -83,11 +74,11 @@ describe('aliases', () => {
.within(() => {
cy.get('.command-alias-count').should('not.exist')
return cy.contains('.command-alias', '@getUsers')
cy.contains('.command-alias', '@getUsers')
.trigger('mouseover')
})
return cy.get('.cy-tooltip span').should(($tooltip) => {
cy.get('.cy-tooltip span').should(($tooltip) => {
expect($tooltip).to.contain('Found an alias for: \'getUsers\'')
})
})
@@ -137,7 +128,7 @@ describe('aliases', () => {
})
it('renders all aliases ', () => {
return cy.get('.command-alias').should('have.length', 3)
cy.get('.command-alias').should('have.length', 3)
})
it('render with counts in non-event commands', () => {
@@ -146,7 +137,7 @@ describe('aliases', () => {
.within(() => {
cy.contains('.command-alias-count', '1')
return cy.contains('.command-alias', '@getPosts')
cy.contains('.command-alias', '@getPosts')
.trigger('mouseover')
})
@@ -159,22 +150,22 @@ describe('aliases', () => {
.within(() => {
cy.contains('.command-alias-count', '2')
return cy.contains('.command-alias', '@getPosts')
cy.contains('.command-alias', '@getPosts')
.trigger('mouseover')
})
return cy.get('.cy-tooltip span').should(($tooltip) => {
cy.get('.cy-tooltip span').should(($tooltip) => {
expect($tooltip).to.contain('Found 2nd alias for: \'getPosts\'')
})
})
it('render with counts in event commands when collapsed', () => {
return cy.get('.command-wrapper')
cy.get('.command-wrapper')
.first()
.within(() => {
cy.contains('.num-duplicates', '2')
return cy.contains('.command-alias', 'getPosts')
cy.contains('.command-alias', 'getPosts')
})
})
@@ -183,12 +174,12 @@ describe('aliases', () => {
.first()
.click()
return cy.get('.command-wrapper')
cy.get('.command-wrapper')
.first()
.within(($commandWrapper) => {
cy.get('.num-duplicates').should('not.be.visible')
return cy.contains('.command-alias', 'getPosts')
cy.contains('.command-alias', 'getPosts')
})
})
})
@@ -262,7 +253,7 @@ describe('aliases', () => {
.within(() => {
cy.contains('.command-alias-count', '1')
return cy.contains('.command-alias', '@getPosts')
cy.contains('.command-alias', '@getPosts')
.trigger('mouseover')
})
@@ -275,11 +266,11 @@ describe('aliases', () => {
.within(() => {
cy.contains('.command-alias-count', '2')
return cy.contains('.command-alias', '@getPosts')
cy.contains('.command-alias', '@getPosts')
.trigger('mouseover')
})
return cy.get('.cy-tooltip span').should(($tooltip) => {
cy.get('.cy-tooltip span').should(($tooltip) => {
expect($tooltip).to.contain('Found 2nd alias for: \'getPosts\'')
})
})
@@ -299,7 +290,7 @@ describe('aliases', () => {
})
})
return cy.get('.reporter').then(() => {
cy.get('.reporter').then(() => {
this.runner.emit('runnables:ready', this.runnables)
return this.runner.emit('reporter:start', {})
@@ -331,7 +322,7 @@ describe('aliases', () => {
})
it('has correct alias class', () => {
return cy.contains('.command-number', '1')
cy.contains('.command-number', '1')
.parent()
.find('.command-alias')
.should('have.class', 'dom')
@@ -343,11 +334,11 @@ describe('aliases', () => {
.within(() => {
cy.get('.command-alias-count').should('not.exist')
return cy.contains('.command-alias', '@barAlias')
cy.contains('.command-alias', '@barAlias')
.trigger('mouseover')
})
return cy.get('.cy-tooltip span').should(($tooltip) => {
cy.get('.cy-tooltip span').should(($tooltip) => {
expect($tooltip).to.contain('Found an alias for: \'barAlias\'')
})
})
@@ -404,7 +395,7 @@ describe('aliases', () => {
.within(() => {
cy.get('.command-alias-count').should('not.exist')
return cy.contains('.command-alias', '@dropdown')
cy.contains('.command-alias', '@dropdown')
.trigger('mouseover')
})
@@ -417,22 +408,22 @@ describe('aliases', () => {
.within(() => {
cy.get('.command-alias-count').should('not.exist')
return cy.contains('.command-alias', '@dropdown')
cy.contains('.command-alias', '@dropdown')
.trigger('mouseover')
})
return cy.get('.cy-tooltip span').should(($tooltip) => {
cy.get('.cy-tooltip span').should(($tooltip) => {
expect($tooltip).to.contain('Found an alias for: \'dropdown\'')
})
})
it('render without counts in event commands when collapsed', () => {
return cy.get('.command-wrapper')
cy.get('.command-wrapper')
.first()
.within(() => {
cy.get('.num-duplicates').should('not.be.visible')
return cy.contains('.command-alias', 'dropdown')
cy.contains('.command-alias', 'dropdown')
})
})
})
@@ -504,7 +495,7 @@ describe('aliases', () => {
})
it('renders all aliases ', () => {
return cy.get('.command-alias').should('have.length', 6)
cy.get('.command-alias').should('have.length', 6)
})
it('render without counts', () => {
@@ -513,7 +504,7 @@ describe('aliases', () => {
.within(() => {
cy.get('.command-alias-count').should('not.exist')
return cy.contains('.command-alias', '@dropdown')
cy.contains('.command-alias', '@dropdown')
.trigger('mouseover')
})
@@ -526,11 +517,11 @@ describe('aliases', () => {
.within(() => {
cy.get('.command-alias-count').should('not.exist')
return cy.contains('.command-alias', '@dropdown')
cy.contains('.command-alias', '@dropdown')
.trigger('mouseover')
})
return cy.get('.cy-tooltip span').should(($tooltip) => {
cy.get('.cy-tooltip span').should(($tooltip) => {
expect($tooltip).to.contain('Found an alias for: \'dropdown\'')
})
})

View File

@@ -10,5 +10,8 @@
},
"extends": [
"plugin:@cypress/dev/tests"
]
],
"rules": {
"no-console": "off"
}
}

View File

@@ -1,16 +1,9 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
describe('e2e async timeouts', () => {
e2e.setup()
return e2e.it('failing1', {
e2e.it('failing1', {
spec: 'async_timeouts_spec.coffee',
snapshot: true,
expectedExitCode: 2,

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
const onServer = (app) => {
@@ -21,7 +14,7 @@ describe('e2e baseUrl', () => {
},
})
return e2e.it('passes', {
e2e.it('passes', {
spec: 'base_url_spec.coffee',
snapshot: true,
})
@@ -38,7 +31,7 @@ describe('e2e baseUrl', () => {
},
})
return e2e.it('passes', {
e2e.it('passes', {
spec: 'base_url_spec.coffee',
snapshot: true,
})

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
const onServer = function (app) {

View File

@@ -1,17 +1,4 @@
/* eslint-disable
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
const Fixtures = require('../support/helpers/fixtures')
const e2ePath = Fixtures.projectPath('e2e')
describe('e2e browserify, babel, es2015', () => {
e2e.setup()

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const Fixtures = require('../support/helpers/fixtures')
const e2e = require('../support/helpers/e2e').default

View File

@@ -1,17 +1,5 @@
/* eslint-disable
brace-style,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const fs = require('fs')
const path = require('path')
const express = require('express')
const Fixtures = require('../support/helpers/fixtures')
const e2e = require('../support/helpers/e2e').default
@@ -74,9 +62,9 @@ describe('e2e cache', () => {
return e2e.exec(this, {
spec: 'cache_clearing_spec.coffee',
})
.then(() => // and after the cache is cleaned before
// opening the browser, it'll make a new request
{
.then(() => {
// and after the cache is cleaned before
// opening the browser, it'll make a new request
expect(requestsForCache).to.eq(2)
})
})

View File

@@ -1,18 +1,5 @@
/* eslint-disable
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const Fixtures = require('../support/helpers/fixtures')
const e2e = require('../support/helpers/e2e').default
const e2ePath = Fixtures.projectPath('e2e')
describe('e2e caught and uncaught hooks errors', () => {
e2e.setup({
servers: {

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
describe('e2e commands outside of test', () => {
@@ -22,7 +15,7 @@ describe('e2e commands outside of test', () => {
expectedExitCode: 1,
})
return e2e.it('passes on passing assertions', {
e2e.it('passes on passing assertions', {
spec: 'assertions_passing_outside_of_test_spec.coffee',
snapshot: true,
})

View File

@@ -1,13 +1,3 @@
/* eslint-disable
brace-style,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const compression = require('compression')
const e2e = require('../support/helpers/e2e').default
const Fixtures = require('../support/helpers/fixtures')
@@ -68,8 +58,8 @@ describe('e2e interception spec', () => {
},
] })
context('character encodings', () => // https://github.com/cypress-io/cypress/issues/1543
{
context('character encodings', () => {
// @see https://github.com/cypress-io/cypress/issues/1543
it('does not mangle non-UTF-8 text', function () {
return e2e.exec(this, {
spec: 'character_encoding_spec.js',

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
const execa = require('execa')
const Fixtures = require('../support/helpers/fixtures')

View File

@@ -1,14 +1,3 @@
/* eslint-disable
brace-style,
no-console,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const moment = require('moment')
const parser = require('cookie-parser')
const e2e = require('../support/helpers/e2e').default
@@ -135,8 +124,8 @@ const onServer = function (app) {
return res.type('html').end()
})
return app.get('/invalidControlCharCookie', (req, res) => // `http` lib throws an error if we use .setHeader to set this
{
return app.get('/invalidControlCharCookie', (req, res) => {
// `http` lib throws an error if we use .setHeader to set this
return res.connection.end(`\
HTTP/1.1 200 OK
Content-Type: text/html
@@ -203,7 +192,7 @@ describe('e2e cookies', () => {
// once browsers are shipping with the options in FORCED_SAMESITE_ENV as default,
// we can remove this extra test case
return e2e.it('with forced SameSite strictness', {
e2e.it('with forced SameSite strictness', {
config: {
experimentalGetCookiesSameSite: true,
baseUrl,
@@ -257,7 +246,7 @@ describe('e2e cookies', () => {
https,
],
) => {
return e2e.it(`passes with baseurl: ${baseUrl}`, {
e2e.it(`passes with baseurl: ${baseUrl}`, {
config: {
experimentalGetCookiesSameSite: true,
baseUrl,
@@ -281,7 +270,7 @@ describe('e2e cookies', () => {
})
})
return e2e.it('passes with no baseurl', {
e2e.it('passes with no baseurl', {
config: {
env: {
httpUrl,

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
const onServer = function (app) {
@@ -28,7 +21,7 @@ describe('e2e go', () => {
// this tests that history changes work as intended
// there have been regressions in electron which would
// otherwise cause these tests to fail
return e2e.it('passes', {
e2e.it('passes', {
spec: 'go_spec.coffee',
snapshot: true,
})

View File

@@ -1,15 +1,3 @@
/* eslint-disable
brace-style,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const fs = require('fs')
const path = require('path')
const bodyParser = require('body-parser')
const Fixtures = require('../support/helpers/fixtures')
@@ -64,8 +52,7 @@ outer contents
return res.send('<html>simple</html>')
})
app.get('/iframe', (req, res) => // send the iframe contents
{
app.get('/iframe', (req, res) => {
return res.sendFile(path.join(e2ePath, 'static', 'iframe', 'index.html'))
})
@@ -89,7 +76,7 @@ describe('e2e iframes', () => {
},
})
return e2e.it('passes', {
e2e.it('passes', {
spec: 'iframe_spec.coffee',
snapshot: true,
config: {

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
describe('e2e images', () => {
@@ -17,8 +10,7 @@ describe('e2e images', () => {
// this tests that images are correctly proxied and that we are not
// accidentally modifying their bytes in the stream
return e2e.it('passes', {
e2e.it('passes', {
spec: 'images_spec.coffee',
snapshot: true,
})

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
const Fixtures = require('../support/helpers/fixtures')

View File

@@ -1,34 +1,20 @@
/* eslint-disable
brace-style,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const fs = require('../../lib/util/fs')
const Fixtures = require('../support/helpers/fixtures')
const e2e = require('../support/helpers/e2e').default
const e2ePath = Fixtures.projectPath('e2e')
describe('e2e issue 149', () => {
e2e.setup()
// https://github.com/cypress-io/cypress/issues/149
it('failing', function () {
return e2e.exec(this, {
spec: 'issue_149_spec.coffee',
snapshot: true,
expectedExitCode: 1,
})
.then(() => // the other test should have still run which should
// have created this file
{
.then(() => {
// the other test should have still run which should
// have created this file
return fs.readFileAsync(Fixtures.projectPath('e2e/foo.js'), 'utf8')
}).then((str) => {
expect(str).to.eq('bar')

View File

@@ -1,21 +1,9 @@
/* eslint-disable
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
const Fixtures = require('../support/helpers/fixtures')
describe('e2e issue 1669', () => {
e2e.setup()
// https://github.com/cypress-io/cypress/issues/1669
it('passes', function () {
return e2e.exec(this, {
spec: 'issue_1669_spec.js',

View File

@@ -1,18 +1,10 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
describe('e2e issue 173', () => {
e2e.setup()
// https://github.com/cypress-io/cypress/issues/173
return e2e.it('failing', {
e2e.it('failing', {
spec: 'issue_173_spec.coffee',
snapshot: true,
expectedExitCode: 1,

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
const Fixtures = require('../support/helpers/fixtures')
@@ -12,7 +5,6 @@ describe('e2e issue 2891', () => {
e2e.setup()
// https://github.com/cypress-io/cypress/issues/2891
it('passes', function () {
return e2e.exec(this, {
project: Fixtures.projectPath('default-layout'),

View File

@@ -1,18 +1,10 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
describe('e2e issue 674', () => {
e2e.setup()
// https://github.com/cypress-io/cypress/issues/674
return e2e.it('fails', {
e2e.it('fails', {
spec: 'issue_674_spec.coffee',
snapshot: true,
expectedExitCode: 1,

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const fs = require('fs')
const Fixtures = require('../support/helpers/fixtures')
const e2e = require('../support/helpers/e2e').default
@@ -52,7 +45,7 @@ describe('e2e js error handling', () => {
}],
})
return e2e.it('fails', {
e2e.it('fails', {
spec: 'js_error_handling_failing_spec.coffee',
snapshot: true,
expectedExitCode: 5,

View File

@@ -1,15 +1,8 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const path = require('path')
const Promise = require('bluebird')
let fs = require('../../lib/util/fs')
const Fixtures = require('../support/helpers/fixtures')
const e2e = require('../support/helpers/e2e').default
let fs = require('../../lib/util/fs')
fs = Promise.promisifyAll(fs)

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
describe('e2e only spec', () => {

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const bodyParser = require('body-parser')
const e2e = require('../support/helpers/e2e').default
@@ -84,7 +77,7 @@ describe('e2e page_loading', () => {
// additionally this creates an edge case where after __cypress.initial is
// set we send an XHR which should not inject because its requested for JSON
// but that another XHR which is requested for html should inject
return e2e.it('passes', {
e2e.it('passes', {
spec: 'page_loading_spec.coffee',
snapshot: true,
})

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
const onServer = function (app) {
@@ -33,7 +26,7 @@ describe('e2e user agent', () => {
},
})
return e2e.it('passes', {
e2e.it('passes', {
spec: 'user_agent_spec.coffee',
snapshot: true,
})

View File

@@ -1,14 +1,5 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const path = require('path')
const {
exec,
} = require('child_process')
const { exec } = require('child_process')
const e2e = require('../support/helpers/e2e').default
const Fixtures = require('../support/helpers/fixtures')

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const fs = require('fs-extra')
const path = require('path')

View File

@@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const e2e = require('../support/helpers/e2e').default
const hosts = {
@@ -20,7 +13,7 @@ describe('e2e domain', () => {
},
})
return e2e.it('passes', {
e2e.it('passes', {
spec: 'domain*',
snapshot: true,
video: false,

View File

@@ -1,13 +1,3 @@
/* eslint-disable
brace-style,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const rp = require('@cypress/request-promise')
const path = require('path')
const Promise = require('bluebird')
@@ -111,7 +101,7 @@ describe('e2e forms', () => {
snapshot: true,
})
return e2e.it('failing', {
e2e.it('failing', {
spec: 'form_submission_failing_spec.coffee',
snapshot: true,
expectedExitCode: 1,
@@ -142,12 +132,12 @@ describe('e2e forms', () => {
],
})
before(() => // go out and fetch this image if we don't already have it
{
before(() => {
// go out and fetch this image if we don't already have it
return fs
.readFileAsync(pathToLargeImage)
.catch({ code: 'ENOENT' }, () => // 16MB image, too big to include with git repo
{
.catch({ code: 'ENOENT' }, () => {
// 16MB image, too big to include with git repo
return rp('https://test-page-speed.cypress.io/files/huge-image.jpg')
.then((resp) => {
return fs.outputFileAsync(pathToLargeImage, resp)
@@ -163,7 +153,7 @@ describe('e2e forms', () => {
snapshot: true,
})
return e2e.it('passes with http on localhost', {
e2e.it('passes with http on localhost', {
config: {
baseUrl: `http://localhost:${HTTP_PORT}`,
},

Some files were not shown because too many files have changed in this diff Show More