Skip to content

Commit

Permalink
Merge pull request #4 from vishvamsinh28/testForked
Browse files Browse the repository at this point in the history
feat: run tests
  • Loading branch information
vishvamsinh28 authored Aug 31, 2024
2 parents 394a685 + da805f7 commit fb4c13b
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 6 deletions.
49 changes: 49 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
coverage:
status:
project:
default:
target: auto
threshold: 0.5
patch:
default:
target: auto
threshold: 0.5

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: yes
macro: yes

flags:
code:
paths:
- scripts/
tests:
paths:
- tests/

comment_flags:
- code
- tests

comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: true
after_n_builds: 1
require_base: no
require_head: yes
show_project: true
show_files: true
show_coverage: true
coverage_layout: "table"
coverage_sections:
- File
- "% Stmts"
- "% Branch"
- "% Funcs"
- "% Lines"
- "Uncovered Line #s"
6 changes: 3 additions & 3 deletions .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ jobs:
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella
token: 25358ea8-8f8c-4ee1-aff3-282914082378
verbose: true
verbose: true
files: ./coverage/lcov.info
token: 25358ea8-8f8c-4ee1-aff3-282914082378
8 changes: 5 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module.exports = {
verbose: true, // display individual test results with the test suite hierarchy
collectCoverage: true, // collect test coverage information\
collectCoverageFrom: ['scripts/**/*.js']
verbose: true,
collectCoverage: true,
collectCoverageFrom: ['scripts/**/*.js'],
coverageReporters: ['text', 'lcov', 'json-summary'],
coverageDirectory: 'coverage'
};
1 change: 1 addition & 0 deletions tests/build-newsroom-videos.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ describe('buildNewsroomVideos', () => {
const response = readFileSync(testFilePath, 'utf8');
expect(response).toEqual(expectedResult);
expect(result).toEqual(expectedResult);
console.log("Hello World!")
});

it('should handle fetch errors', async () => {
Expand Down

0 comments on commit fb4c13b

Please sign in to comment.