-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
refactor(tests): API tests #32643
refactor(tests): API tests #32643
Conversation
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #32643 +/- ##
===========================================
- Coverage 56.73% 56.72% -0.01%
===========================================
Files 2496 2496
Lines 55360 55359 -1
Branches 11455 11455
===========================================
- Hits 31407 31403 -4
+ Misses 21255 21253 -2
- Partials 2698 2703 +5
Flags with carried forward coverage won't be shown. Click here to find out more. |
8f8cb55
to
a7a6016
Compare
a7a6016
to
951d24d
Compare
b654f09
to
191e534
Compare
expect(res.body).to.have.property('success', true); | ||
expect(res.body).to.have.property('files').and.to.be.an('array'); | ||
}) | ||
.end(done); | ||
}); | ||
|
||
it('should not return thumbnails', async function () { | ||
it('should not return thumbnails', async () => { |
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.
are these changes because of our eslint rules? just want to point this out https://mochajs.org/#arrow-functions
I wonder if should have a mix of arrow and non-arrow functions when the this
context is needed, or if we should stick to one or the other
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.
ESLint rules. However, @typescript-eslint
ensures functions are converted to arrow functions only when there is no references to this
.
Personally, it feels like there is very little situations where we need to use the Mocha context e.g. this.retries(n)
was redudant with the current configuration and calls to this.skip()
are rare and easily replaced with it.skip
/describe.skip
.
do you have a before/after of JS/TS files? I'm just curious about the new stats |
Proposed changes (including videos or screenshots)
It migrates integration tests to TypeScript.
Issue(s)
Steps to test or reproduce
Further comments
The goal of this changes is to raise the maintenance rate and, subsequently, the quality of these tests.
Before
After