-
-
Notifications
You must be signed in to change notification settings - Fork 28
Conversation
I think this should be merged as soon as possible. Then any new queries/mutations/utility-functions can be written with tests |
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.
Only one suggestion/question re: the schema.
Apart from that, I have no idea what I am talking about with classes, the only thing I have ever done with super
is pass it props in react. And I only do that because I have seen other people to it. So, totally not qualified to talk about them in this instance.
EDIT: After re-reading this, I just giggled at 'instance'. /r/ProgrammerHumor
test/user.test.js
Outdated
const { makeExecutableSchema } = require('graphql-tools'); | ||
import typeDefs from '../graphql/typeDefs'; | ||
import resolvers from '../graphql/resolvers'; | ||
const graphqlSchema = makeExecutableSchema({ |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Thanks @Bouncey, I'll see if I can address your issue tomorrow, happy to hear you are receptive to getting these tests in earlier sooner than later. |
…ust_jestingk * 'just_jestingk' of github.com:ojongerius/open-api: feat(testing): adds Jest config and one small test
So that's done. Test succeeds, now I just need to make linting pass, and resolve conflicts. @Bouncey @raisedadead good to merge after those chores have been taken care of? |
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.
Changes LGTM. Is this ready for QA?
Hi @ojongerius. We shouldn't be merging our own PRs at this time. We could have combined the multiple |
Sure! Got a bit impatient 😃 |
This currently is mostly scaffolding: it hooks up Jest, and sets up a config that spins up a MongoDB server in memory -according to docs that should take about 7MB or RAM and runs tests against it. Saves us from wiring up Docker and configuring services in Travis.
There is an issue with running these tests in parallel, see jestjs/jest#5731 for now we can run tests serially, which is the recommended mode for CI anyway 🤷♂️ .
The only test I've added for now is test/user.test.js, which creates a user using mongoose, and tests if it can retrieve it using graphql. As that endpoint has 2 PRs open and I don't want to get in their way, I won't try to get this merged yet. However, I'd love for us to start having a healthy culture of tests in place sooner rather than later 😺
@Bouncey, @raisedadead I've added you as reviewers but mind the WiP label, it's there for a reason .
Replaces #66