Skip to content

Conversation

@mateonunez
Copy link
Contributor

@mateonunez mateonunez commented Jul 30, 2023

Full Coverage

This PR aims to bring a full-covered code by tests.

To do this I've made some changes to make the code more testable like: error handling and edge cases.

This PR is labeled as:

Choose only one and remember to select the label even on the right.

  • Feature
  • Bug
  • Other
---------------|---------|----------|---------|---------|-------------------
File           | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
---------------|---------|----------|---------|---------|-------------------
All files      |     100 |      100 |     100 |     100 |                   
 constants.js  |     100 |      100 |     100 |     100 |                   
 dictionary.js |     100 |      100 |     100 |     100 |                   
 stdlib.js     |     100 |      100 |     100 |     100 |                   
 utils.js      |     100 |      100 |     100 |     100 |                   
---------------|---------|----------|---------|---------|-------------------

@mateonunez mateonunez marked this pull request as draft July 30, 2023 09:57
@mateonunez mateonunez changed the title Test/full coverage test: add full coverage Jul 30, 2023
@mateonunez mateonunez marked this pull request as ready for review July 30, 2023 10:27
@airscripts airscripts self-requested a review July 30, 2023 13:27
@airscripts airscripts added the enhancement New feature or request label Jul 30, 2023
@airscripts
Copy link
Owner

Thank you so much for your contribute @mateonunez!
I've made some edits in order to not bother you with them.

I've removed one of the tests, since it exposes a flaw that I've seen inside stringify function. I'll try to fix it in another PR.
Aside of this, I've added one more test for the compile function and started testing utils.
For this last one, I think it's needed a spy function for the process.exit()'s one...and this was the reason on why I've avoided the try/catch system on the cli's root file.

Hope you had fun with this and hopefully even a smile for this project. Thank you kindly!

@airscripts airscripts merged commit 7975065 into airscripts:main Jul 30, 2023
@mateonunez mateonunez deleted the test/full-coverage branch July 30, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants