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の準備 #11

Merged
merged 6 commits into from
Mar 23, 2019
Merged

testの準備 #11

merged 6 commits into from
Mar 23, 2019

Conversation

mori-atsushi
Copy link
Contributor

close #5

  • jestでテストを組んだ
    • resolversの単体テストとApolloServerの結合テストの例
  • CIでテストを回すようにした
  • coverageを測定するようにした

@codecov
Copy link

codecov bot commented Mar 19, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@fb29a06). Click here to learn what that means.
The diff coverage is 60%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master     #11   +/-   ##
========================================
  Coverage          ?   87.5%           
========================================
  Files             ?       1           
  Lines             ?      16           
  Branches          ?       2           
========================================
  Hits              ?      14           
  Misses            ?       2           
  Partials          ?       0
Impacted Files Coverage Δ
src/index.ts 87.5% <60%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb29a06...d5d419c. Read the comment docs.

query: undefined,
mutation: LOGIN,
variables: { email: '[email protected]', password: 'password' },
} as any);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

typescriptの型情報が間違ってるっぽいので、とりあえずanyで突っ込んでます。(良い解決策求む)
apollographql/apollo-server#2172

Copy link
Contributor

Choose a reason for hiding this comment

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

ねえ、型って知ってる?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

別PRで対応

@mori-atsushi mori-atsushi added the wait for review レビューまちのPR label Mar 21, 2019
// eslint-disable-next-line no-console
console.log(`🚀 Server ready at localhost:${PORT}${server.graphqlPath}`);
});
if (process.env.NODE_ENV !== 'test') {
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 fileを分けた時にこの分岐をなくす

query: undefined,
mutation: LOGIN,
variables: { email: '[email protected]', password: 'password' },
} as any);
Copy link
Contributor

Choose a reason for hiding this comment

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

ねえ、型って知ってる?

Copy link
Contributor

@euglena1215 euglena1215 left a comment

Choose a reason for hiding this comment

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

よいと思いまーす

@euglena1215 euglena1215 merged commit 79bcd85 into master Mar 23, 2019
@euglena1215 euglena1215 deleted the 5-test branch March 23, 2019 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wait for review レビューまちのPR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

テストの準備をする
2 participants