-
Notifications
You must be signed in to change notification settings - Fork 799
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
[backend] add test coverage on indicator upsert issue (#5819). #5846
Conversation
42ff338
to
a6c094c
Compare
input: { | ||
toId: 'marking-definition--78ca4366-f5b8-4764-83f7-34ce38198e27', | ||
toId: MARKING_TLP_GREEN, |
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 change on marking is done to make indicator-test run in standalone.
2da2d16
to
1e818ca
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5846 +/- ##
=======================================
Coverage 65.02% 65.02%
=======================================
Files 523 523
Lines 61449 61449
Branches 4942 4944 +2
=======================================
Hits 39959 39959
Misses 21490 21490 ☔ View full report in Codecov by Sentry. |
expect(queryResult.data?.indicators.edges.length).toEqual(4); | ||
const indicatorList: [] = queryResult.data?.indicators.edges; | ||
expect(indicatorList).toBeDefined(); | ||
if (indicatorList) { |
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.
I suggest you do not check this ; you already expect it to be defined earlier so the test will fail explicitly.
it makes the code base more straightforward (dumb and simple I might say).
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.
deepscan is asking me to check it or it fails, maybe I'm missing something.... it seems that the expect is not enough
Proposed changes
Related issues
Checklist
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...