Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Creating new function to push test results after executed with bst CLI #494

Merged
merged 6 commits into from
Dec 14, 2021

Conversation

maxbespoken
Copy link
Contributor

Ticket: #492

The code implemented is for a new class to send execution results to "bespoken-api" endpoint.
This new class executes after JEST completes the execution of all suites and it pushes the results to the endpoint.

Environment variable was added for point the "bespoken-api".
Name: BESPOKEN_API_BASE_URL
Default value: https://bespoken-api.bespoken.tools

Also, it was removed the code related to "saveTestResults", "getSourceExists" and its dependencies in the unit tests.

@maxbespoken maxbespoken self-assigned this Nov 19, 2021
lib/runner/TestRunner.js Outdated Show resolved Hide resolved
}, [process.cwd()]);
const success = returnValue.results ? returnValue.results.success : false;
return success;
return jestModule.runCLI({ config, runInBand }, [process.cwd()])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method has changed the return type of the function, before the change a boolean was the result of the function, now it is a promise. Make sure this change does not break how jest interact with our code

@codecov
Copy link

codecov bot commented Nov 24, 2021

Codecov Report

Merging #494 (bb077da) into master (278caa4) will decrease coverage by 0.05%.
The diff coverage is 97.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #494      +/-   ##
==========================================
- Coverage   92.22%   92.17%   -0.06%     
==========================================
  Files          28       30       +2     
  Lines        2213     2301      +88     
  Branches      499      497       -2     
==========================================
+ Hits         2041     2121      +80     
- Misses        159      167       +8     
  Partials       13       13              
Impacted Files Coverage Δ
lib/runner/JestAdapter.js 94.38% <90.00%> (+0.40%) ⬆️
lib/util/StopWatch.js 92.30% <92.30%> (ø)
lib/runner/TestRunner.js 95.61% <96.96%> (-0.47%) ⬇️
lib/runner/ResultsPublisher.js 98.63% <98.63%> (ø)
lib/runner/CLI.js 83.92% <100.00%> (+0.59%) ⬆️
lib/util/Util.js 97.36% <100.00%> (+0.14%) ⬆️
lib/test/Test.js 95.65% <0.00%> (-4.35%) ⬇️
lib/test/TestResult.js 91.30% <0.00%> (-4.35%) ⬇️
lib/util/HTTP.js 90.00% <0.00%> (-3.34%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 278caa4...bb077da. Read the comment docs.

@ecruzado ecruzado merged commit 3185445 into master Dec 14, 2021
@maxbespoken maxbespoken deleted the feature-addbespokenresultsintojestresult-by_max branch December 23, 2021 23:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants