Skip to content
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

feat: run tests #4

Merged
merged 25 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading