-
-
Notifications
You must be signed in to change notification settings - Fork 45
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/increase codecoverage #204
Conversation
…test/increase-codecoverage
Codecov Report
@@ Coverage Diff @@
## master #204 +/- ##
==========================================
+ Coverage 86.81% 87.38% +0.56%
==========================================
Files 165 164 -1
Lines 3572 3559 -13
Branches 558 558
==========================================
+ Hits 3101 3110 +9
+ Misses 471 449 -22
|
DX Scanner Reporthttps://github.com/DXHeroes/dx-scanner
|
Name | New | Current |
---|---|---|
@commitlint/lint | 8.3.5 | 8.3.4 |
memfs | 3.0.4 | 3.0.3 |
ts-node | 8.6.2 | 8.6.1 |
@types/node | 13.1.7 | 12.12.24 |
semantic-release | 16.0.2 | 16.0.1 |
@types/jest | 24.9.0 | 24.0.25 |
@typescript-eslint/eslint-plugin | 2.16.0 | 2.15.0 |
@typescript-eslint/parser | 2.16.0 | 2.15.0 |
Impact changed from high to medium.
ESLint Without Errors
Use the ESLint correctly. You have some errors. https://eslint.org/
🔔 Improvements with minor impact
Write Commit Messages by Convention
https://www.conventionalcommits.org/
Commit Message | Problems |
---|---|
docs: Travis badge uses a master branch to show build status | subject must not be sentence-case, start-case, pascal-case, upper-case |
chore: use listIssueComments for GitHub to list comments for a pull request | header must not be longer than 72 characters, current length is 75 |
Update Dependencies of Major Level
Keep the dependencies updated to have all possible features. Use, for example, npm-check-updates. https://github.com/tjunnone/npm-check-updates
Name | New | Current |
---|---|---|
@types/node | 13.1.7 | 12.12.24 |
Use a JS Logging Library
Use a logging library to avoid errors and even cyber attacks. The most widely used logging library in the JavaScript community is Winston. https://www.npmjs.com/package/winston/
Implementation is not adoption.
We can help you with both. :-)
dxheroes.io
Found a bug? Please report.
…test/increase-codecoverage
…test/increase-codecoverage
src/inspectors/FileInspector.spec.ts
Outdated
// beforeEach(() => { | ||
// virtualFileSystemService = new FileSystemService({ isVirtual: true }); | ||
// fileInspector = new FileInspector(virtualFileSystemService, '/'); | ||
// }); | ||
|
||
afterEach(async () => { | ||
containerCtx.virtualFileSystemService.clearFileSystem(); | ||
containerCtx.practiceContext.fileInspector!.purgeCache(); | ||
}); | ||
|
||
it('Throws an error if the file does not exist', async () => { | ||
const path = './'; | ||
// const structure: DirectoryJSON = { | ||
// '/index.cpp': '...', | ||
// }; | ||
|
||
// virtualFileSystemService.setFileSystem(structure); | ||
try { | ||
await fileInspector.scanFor('not.exist', path); | ||
fail(); | ||
} catch (error) { | ||
expect(error.message).toEqual(`ENOENT: no such file or directory, readdir '${path}'`); | ||
} | ||
// expect(async () => { | ||
// await fileInspector.scanFor('not.exist', path); | ||
// }).toThrow(); | ||
}); | ||
|
||
// it('Returns practicing if there is a .gitignore', async () => { | ||
// const structure: DirectoryJSON = { | ||
// '/index.cpp': '...', | ||
// }; | ||
|
||
// virtualFileSystemService.setFileSystem(structure); | ||
// const isFile = await fileInspector.isFile('/index.cpp'); | ||
// expect(isFile).toEqual(true); | ||
// }); |
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.
remove comments
@@ -67,6 +68,20 @@ describe('ThinPullRequestsPractice', () => { | |||
expect(evaluated).toEqual(PracticeEvaluationResult.notPracticing); | |||
}); | |||
|
|||
it('return unknown if there is no PR', async () => { | |||
mockCollaborationInspector.listPullRequests = async () => { | |||
const pr = _.cloneDeep(getPullRequestsResponse()); |
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 PR is included in version 1.35.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Add tests to increase codecoverage