-
Notifications
You must be signed in to change notification settings - Fork 2
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
add more tests, use the Sourcegraph stubs api and improve repo matching. #13
Conversation
src/test/extension.test.ts
Outdated
|
||
describe('extension', () => { | ||
it('works', () => void 0) | ||
}) | ||
|
||
describe('check for extension activation', () => { | ||
it('activate extension', () => expect(activate(sourcegraph.ExtensionContext)).toEqual(void 0)) |
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 works in that it checks that the extension's activate
function does not crash when called. However it doesn't test much beyond that. I would add more comprehensive tests for the actual functionality, for instance:
- The extension reacts to windows/editor changes and decorates editors accordingly
- The extension reacts to configuration changes and decorates editors accordingly
…urcegraph-sentry into vo/increase-test-coverage
Codecov Report
@@ Coverage Diff @@
## master #13 +/- ##
==========================================
+ Coverage 75.72% 85.12% +9.39%
==========================================
Files 3 3
Lines 103 121 +18
Branches 20 29 +9
==========================================
+ Hits 78 103 +25
+ Misses 25 18 -7
Continue to review full report at Codecov.
|
Co-Authored-By: Felix Becker <[email protected]>
Co-Authored-By: Felix Becker <[email protected]>
Co-Authored-By: Felix Becker <[email protected]>
linePatterns, repositories and files were typed as RegExp[], but the user would have actually entered them as string[]. Having them typed as RegExp[] hid potential bugs where their real type would not have been handled properly.
Use the Sourcegraph stubs api for testing, improve repo matching.