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 a test suite #46

Open
blimmer opened this issue Jan 29, 2020 · 4 comments
Open

Add a test suite #46

blimmer opened this issue Jan 29, 2020 · 4 comments
Assignees
Labels
Help Wanted Extra attention is needed

Comments

@blimmer
Copy link
Collaborator

blimmer commented Jan 29, 2020

As part of #43, it came up that a unit test suite would be a good addition. In this thread, we could discuss what that might look like technology-wise.

Items to discuss:

  1. Where it builds
    It looks like Travis-CI is what's required on branch and PR builds, so likely that should also run the test suite.

  2. Tech stack
    I have the most experience with Mocha and Chai but, since this project uses React, something like Jest might be preferable to the other maintainers?

  3. Unit / Integration / Functional Tests
    We could easily start off with just unit tests, adding in additional test suites later like component (integration) tests or functional test (e.g. Cypress).

@kevinschaich
Copy link
Owner

kevinschaich commented Jan 30, 2020

While I'm in favor of adding these on a high level, want to call 2 things out:

  1. I think this will be quite a large endeavor and I'm not sure I'll personally have the time to add it for a while
  2. I think we should focus on testing the core back-end functions (such as interfacing with transactions & spreadsheets) rather than the front-end config framework, as I've gotten a lot of reports that the current GUI is kind of buggy and we might scrap it soon for something else.

Keeping those in mind I think this is a great idea and would welcome contributions.

We don't use react anywhere but in the front end so if there's another suite that the community is more familiar with, let's use that.

@blimmer
Copy link
Collaborator Author

blimmer commented Feb 2, 2020

Absolutely - my intention was not to ask you to write a whole test suite. I was mostly trying to gauge what framework might be ideal for testing so we could start introducing some tests as we go along. With #48, I agree that maybe we don't test the front-end logic right away.

I'm most familiar with Mocha and Chai, but I feel like that might date me. From what I can tell on the internets, Jest is what a lot of people are using nowadays.

@bennett39
Copy link

I'd say Jest or Mocha are both pretty popular still, and we'd be fine using either. Jest has the backing of Facebook, so it gets the nod from React a lot, but either works just fine. If you know Mocha, go with what you know. I'm sure it can handle what we need.

@kevinschaich
Copy link
Owner

Hey @blimmer / @bennett39 – just wanted to highlight that we've added some non-exhaustive smoke testing pending the v2.0.0 release (see #55). You can check them out on the project's GitHub Actions page.

Right now we have two workflows:

  • test: Tests whether all the code compiles and matches linter/formatter specs
  • fetch: Tests whether the new mintable CLI can successfully fetch a dummy Plaid account and update a public Google Spreadsheet template without error

We require both of these to pass before merging a PR.

For now I'll mark this issue as help wanted but I won't have the time to tackle a proper test suite in the short term.

@kevinschaich kevinschaich added Help Wanted Extra attention is needed and removed Deferred to 2.1.0 labels Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants