Fixes crash on renamed
file change status
Showing 3 of 8 files from the diff.
src/tests/mocks/env/index.ts
changed.
src/FilesHelper.ts
changed.
Other files ignored by Codecov
package.json
has changed.
src/typings/GitHubFile/index.d.ts
has changed.
package-lock.json
is new.
src/typings/FsMock/index.d.ts
has changed.
src/tests/FilesHelper.test.ts
has changed.
@@ -25,6 +25,7 @@
Loading
25 | 25 | // eslint-disable-next-line prefer-promise-reject-errors |
|
26 | 26 | (!data.base && !data.head && !data.pull_number) |
|
27 | 27 | ) |
|
28 | + | // eslint-disable-next-line prefer-promise-reject-errors |
|
28 | 29 | return Promise.reject({name: 'HttpError', status: '404'}) |
|
29 | 30 | if (data.pull_number) { |
|
30 | 31 | if (cb) |
@@ -7,7 +7,7 @@
Loading
7 | 7 | /** |
|
8 | 8 | * @function sortChangedFiles |
|
9 | 9 | * @param files pass in array of GithubFile's to be sorted |
|
10 | - | * @returns ChangedFiles object that has .files, .added, .modified, and .removed |
|
10 | + | * @returns ChangedFiles object that has .files, .added, .modified, .renamed, and .removed |
|
11 | 11 | */ |
|
12 | 12 | export function sortChangedFiles(files: GitHubFile[]): ChangedFiles { |
|
13 | 13 | try { |
@@ -18,13 +18,14 @@
Loading
18 | 18 | files: [], |
|
19 | 19 | added: [], |
|
20 | 20 | removed: [], |
|
21 | + | renamed: [], |
|
21 | 22 | modified: [] |
|
22 | 23 | } as ChangedFiles |
|
23 | 24 | files.forEach(f => { |
|
24 | 25 | changedFiles[f.status].push( |
|
25 | - | f.filename || f.added || f.removed || f.modified |
|
26 | + | f.filename || f.added || f.removed || f.renamed || f.modified |
|
26 | 27 | ) |
|
27 | - | changedFiles.files.push(f.filename || f.added || f.removed || f.modified) |
|
28 | + | changedFiles.files.push(f.filename || f.added || f.removed || f.modified || f.renamed) |
|
28 | 29 | }) |
|
29 | 30 | return changedFiles |
|
30 | 31 | } catch (error) { |
Files | Coverage |
---|---|
src | 100.00% |
Project Totals (16 files) | 100.00% |
111499895
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.