-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
decaffeinate: Run post-processing cleanups on browser.coffee
- Loading branch information
Showing
1 changed file
with
17 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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), | ||
} | ||
} |
9326174
There was a problem hiding this comment.
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.9326174
There was a problem hiding this comment.
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
):In PowerShell:
In Git Bash:
Using
cross-env
:If the above commands do not work for you, you can also try using
cross-env
:9326174
There was a problem hiding this comment.
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
):In PowerShell:
In Git Bash:
Using
cross-env
:If the above commands do not work for you, you can also try using
cross-env
:9326174
There was a problem hiding this comment.
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.