Skip to content

Commit

Permalink
decaffeinate: Run post-processing cleanups on browser.coffee
Browse files Browse the repository at this point in the history
  • Loading branch information
kuceb committed Feb 13, 2020
1 parent bfa6f54 commit 9326174
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions packages/driver/src/cypress/browser.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const _ = require("lodash");
const $utils = require("./utils");
const _ = require('lodash')
const $utils = require('./utils')

const isBrowser = function(config, obj='') {
const isBrowser = function (config, obj = '') {
if (_.isString(obj)) {
const name = obj.toLowerCase();
const currentName = config.browser.name.toLowerCase();
const name = obj.toLowerCase()
const currentName = config.browser.name.toLowerCase()

return name === currentName;
return name === currentName
}

if (_.isObject(obj)) {
return _.isMatch(config.browser, obj);
return _.isMatch(config.browser, obj)
}

return $utils.throwErrByPath("browser.invalid_arg", {
args: { method: 'isBrowser', obj: $utils.stringify(obj) }
});
};
$utils.throwErrByPath('browser.invalid_arg', {
args: { method: 'isBrowser', obj: $utils.stringify(obj) },
})
}

module.exports = config => ({
browser: config.browser,
isBrowser: _.partial(isBrowser, config)
});
module.exports = (config) => {
return {
browser: config.browser,
isBrowser: _.partial(isBrowser, config),
}
}

4 comments on commit 9326174

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 9326174 Feb 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.0.2/linux-x64/circle-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-253893/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.0.2/circle-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-253879/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 9326174 Feb 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

Instructions are included below, depending on the shell you are using.

In Command Prompt (cmd.exe):

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.0.2/win32-x64/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.0.2/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.tgz

In PowerShell:

$env:CYPRESS_INSTALL_BINARY = https://cdn.cypress.io/beta/binary/4.0.2/win32-x64/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.0.2/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.tgz

In Git Bash:

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.0.2/win32-x64/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.0.2/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.tgz

Using cross-env:

If the above commands do not work for you, you can also try using cross-env:

npm i -g cross-env
cross-env CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.0.2/win32-x64/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.zip npm install https://cdn.cypress.io/beta/npm/4.0.2/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 9326174 Feb 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 ia32 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

Instructions are included below, depending on the shell you are using.

In Command Prompt (cmd.exe):

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.0.2/win32-ia32/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.0.2/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.tgz

In PowerShell:

$env:CYPRESS_INSTALL_BINARY = https://cdn.cypress.io/beta/binary/4.0.2/win32-ia32/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.0.2/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.tgz

In Git Bash:

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.0.2/win32-ia32/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.0.2/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.tgz

Using cross-env:

If the above commands do not work for you, you can also try using cross-env:

npm i -g cross-env
cross-env CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.0.2/win32-ia32/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.zip npm install https://cdn.cypress.io/beta/npm/4.0.2/appveyor-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-30784872/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 9326174 Feb 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/4.0.2/darwin-x64/circle-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-253903/cypress.zip
npm install https://cdn.cypress.io/beta/npm/4.0.2/circle-develop-932617495d67d3d24bfcc4d14409d1a5f677206a-253900/cypress.tgz

Please sign in to comment.