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

add some e2e tests #16

Closed
aladdin-add opened this issue Dec 31, 2021 · 2 comments
Closed

add some e2e tests #16

aladdin-add opened this issue Dec 31, 2021 · 2 comments

Comments

@aladdin-add
Copy link
Member

aladdin-add commented Dec 31, 2021

the test coverage (based on the commit 2305c83):

------------------------|---------|----------|---------|---------|----------------------------------
File                    | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                
------------------------|---------|----------|---------|---------|----------------------------------
All files               |   73.38 |    88.99 |   80.76 |   73.38 |                                  
 init                   |   73.08 |    88.78 |    87.5 |   73.08 |                                  
  config-file.js        |     100 |     90.9 |     100 |     100 | 47,112                           
  config-initializer.js |   56.76 |     84.9 |   72.72 |   56.76 | ...4-275,306-335,342-541,547-549 
  npm-utils.js          |     100 |    93.75 |     100 |     100 | 57,100                           
 shared                 |      84 |      100 |       0 |      84 |                                  
  logging.js            |      84 |      100 |       0 |      84 | 15-16,24-25                      
------------------------|---------|----------|---------|---------|----------------------------------

the coverage is not very high as it does not test users input. I was thinking of writing an e2e test runner to support something like:

const configs = [
{
  desc: "",
  input: [""], // to simulate user input
  validate: function () {
     assert(...) // to verify the output, generated config
  }
},
]

run(configs);

the config's each item means a user input & its output (will be cleaned after running). Let me know what you think. :)

@eslint-github-bot eslint-github-bot bot added this to Needs Triage in Triage Dec 31, 2021
@nzakas nzakas moved this from Needs Triage to Ready to Implement in Triage Jan 6, 2022
@github-actions
Copy link
Contributor

Oops! It looks like we lost track of this issue. What do we want to do here? This issue will auto-close in 7 days without an update.

@aladdin-add
Copy link
Member Author

closing as we have switched to snapshot testing in 54ac1f2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Triage
Ready to Implement
Development

No branches or pull requests

2 participants