Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create plugins API and add preprocessor plugin support #888

Merged
merged 82 commits into from
Nov 20, 2017

Conversation

chrisbreiding
Copy link
Contributor

@chrisbreiding chrisbreiding commented Nov 8, 2017

Implements the base plugins API and preprocessor plugin support as per #684.

Related PRs:

Docs: cypress-io/cypress-documentation#226
Examples: cypress-io/cypress-example-recipes#19

# Conflicts:
#	packages/server/lib/controllers/spec.coffee
#	packages/server/lib/socket.coffee
#	packages/server/lib/util/bundle.coffee
#	packages/server/test/unit/bundle_spec.coffee
#	packages/server/test/unit/spec_spec.coffee
@CLAassistant
Copy link

CLAassistant commented Nov 8, 2017

CLA assistant check
All committers have signed the CLA.

@brian-mann
Copy link
Member

@paulfalgout this is the PR for babel configuration and the new plugins API

@@ -1 +1 @@
{foo: "bar"}
{ 'bar' }
Copy link
Contributor

Choose a reason for hiding this comment

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

why such weird javacript string here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what that's about. I think eslint keeps auto-formatting it for some reason.

videoUploadOnPasses
watchForFileChanges
waitForAnimations
""".trim().split(/\s+/)
Copy link
Contributor

Choose a reason for hiding this comment

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

pretty good idea to have text block here. Maybe separate .trim().split(/\s+/) to named function that describes its purpose like toWords

@@ -80,10 +106,12 @@ validationRules = {
integrationFolder: v.isString
numTestsKeptInMemory: v.isNumber
Copy link
Contributor

Choose a reason for hiding this comment

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

we could make these predicates stronger by having method v.isPositive to make sure user provided value is > 0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good to me. Seems out of scope for this PR though...

it('returns client source as a string', function(done) {
const p = process.cwd() + '/node_modules/socket.io-client/dist/socket.io.js'
it('returns client source as a string', function (done) {
const p = `${process.cwd()}/node_modules/socket.io-client/dist/socket.io.js`
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should be more consistent about using path.join here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I think the only reason this changed is that eslint auto-fixed it.

@brian-mann
Copy link
Member

Fixes #684

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants