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

Test setup #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Test setup #5

wants to merge 3 commits into from

Conversation

RodMachado
Copy link

@rdickert
Basic test setup.

👍

@arrygoo
Copy link

arrygoo commented Nov 21, 2016

👍 Pretty cool.

Copy link
Contributor

@rdickert rdickert left a comment

Choose a reason for hiding this comment

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

@RodMachado cf my comments in slack about the yarn.lock file.

@@ -11,5 +11,14 @@
},
"settings": {
"import/resolver": "meteor",
},
"globals": {
Copy link
Contributor

Choose a reason for hiding this comment

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

There are a couple of other ways we could do this (@pauldowman do you have an opinion here?):

{
    "env": {
        "mocha": true
    }
}

The above is maybe a little cleaner/semantic. One side-effect of setting these is that it affects non-test code. E.g., lodash has before and after methods, and lodash methods may be imported by name directly. app also seems like it could turn up. If we want to avoid that, we could ask testers to set this at the top of each test file:

/* eslint-env mocha */

That might be my preferred method, but I'm interested what anyone else thinks.

Copy link
Author

Choose a reason for hiding this comment

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

@rdickert
Fell free to change as you see fit. I don't have an opinion about this and you're probably better to decide what's the best method.
😄

"babel-eslint": "4.x.x",
"babel-plugin-transform-runtime": "6.x.x",
"babel-polyfill": "6.x.x",
"babel-preset-es2015": "6.x.x",
"babel-preset-stage-2": "6.x.x",
"chai": "3.x.x",
"chai-spies": "^0.7.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this package? It seems redundant with testdouble

Copy link
Author

Choose a reason for hiding this comment

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

Nope, using testdouble for that.

@@ -15,6 +15,8 @@ const graphql = (document, config = {}) => {
throw new Error(`graphql(react-apollo-helpers): Expected 1 graphQL operation. ${document.definitions.length} operations detected.`);
}

const { name } = config;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a bug fix. It probably belongs in a separate pr, but since it's needed here and is a one-liner, let's maybe not worry about it.

Copy link
Author

Choose a reason for hiding this comment

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

👍

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.

3 participants