-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: master
Are you sure you want to change the base?
Test setup #5
Conversation
👍 Pretty cool. |
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.
@RodMachado cf my comments in slack about the yarn.lock file.
@@ -11,5 +11,14 @@ | |||
}, | |||
"settings": { | |||
"import/resolver": "meteor", | |||
}, | |||
"globals": { |
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.
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.
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.
@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", |
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.
Do we need this package? It seems redundant with testdouble
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.
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; |
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.
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.
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.
👍
@rdickert
Basic test setup.
👍