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

Write end-to-end tests #14

Open
agentofuser opened this issue May 3, 2019 · 3 comments
Open

Write end-to-end tests #14

agentofuser opened this issue May 3, 2019 · 3 comments
Labels
kind/test Testing work

Comments

@agentofuser
Copy link
Collaborator

agentofuser commented May 3, 2019

I don't have much experience testing JS, so suggestions of tools and practices are welcome.

@olizilla
Copy link
Member

olizilla commented May 3, 2019

Strongly agree! I suggest ava - https://github.com/avajs/ava

it'd be great to split out the internals into small, tested functions, and split out the interface as per #7

I'm keen to help, so please do assign me on issues you are happy to for me to work on. If I can't do it'll i'll just let you know! I don't want to take any jobs that you're keen to do... for example, i'd love to try out pastel for #7 but I think that might be a fun job.

@agentofuser
Copy link
Collaborator Author

I'm keen to help, so please do assign me on issues you are happy to for me to work on. If I can't do it'll i'll just let you know!

That's awesome! I like the speculative-assignment protocol :) Also, really appreciate your generosity 🙏

Strongly agree! I suggest ava - https://github.com/avajs/ava

Seems like a good choice! At this point I feel like Sindre Sorhus is basically writing my code for me.

it'd be great to split out the internals into small, tested functions, and split out the interface as per #7

Yeah, I want to split things as much as possible into:

  • pure total functions
  • effectful functions
  • pure UI

It seems like ava works for all of these.

Pastel uses ava, and there's also an example of blackbox-testing a CLI with ava: https://github.com/sindresorhus/active-win-cli/blob/d01813762b304102d1fee147855481e9f38c8517/test.js#L5-L6.

I think it's easier to keep things in JS rather than use something like bats, as my bash-fu is pretty limited and also JS works in more environments (#17).

I don't want to take any jobs that you're keen to do... for example, i'd love to try out pastel for #7 but I think that might be a fun job.

That's very considerate :) Yeah, in general I prefer focusing on UX, so I'm very much looking forward to familiarizing myself with pastel and ink.

@agentofuser
Copy link
Collaborator Author

Oh, and as for the splitting, I think we can start with the extremities first, doing PTF (pure total function) and 100%-blackbox testing, then work our way to the middle with more granular testing for effectful functions.

@hacdias hacdias added the kind/test Testing work label Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/test Testing work
Projects
None yet
Development

No branches or pull requests

3 participants