Skip to content

test: add infra, setup, fixtures and e2e tests to actually run cli and catch bugs before users get them. - #616

Merged
lwasser merged 8 commits into
all-contributors:mainfrom
lwasser:end-to-end
Nov 9, 2026
Merged

lwasser merged 8 commits into
all-contributors:mainfrom
lwasser:end-to-end

Conversation

@lwasser

@lwasser lwasser commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Currently it scares me to merge things because we miss critical bugs if we aren't running the cli. This pr will get opened in draft to demonstrate what setup could look like for a e2e test suite that has fixtures. here each test can run in it's own tmp directory. We can test things like - what happens if a readme is missing (included so far), what do errors look like, and just running the CLI makes the entire test suite better.

supports but doesn't close #614

What:
fixtures, run e2e separately, better error messages, all the beautiful text elements that this package should have!

Why:

because we need to be able to hit the actual cli to identify bugs and issues before users see them.
How:

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table

Comment thread test/e2e/cli.test.js Resolved
Comment thread test/e2e/fixtures.js Resolved
Comment thread test/e2e/fixtures.js Resolved
Comment thread package.json Resolved
@lwasser
lwasser marked this pull request as ready for review November 8, 2026 03:07
@lwasser
lwasser requested a review from a team November 8, 2026 03:07
@lwasser lwasser added type: tests Changes to tests type: ci Changes to CI workflows labels Nov 8, 2026

@michaelfaith michaelfaith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Mainly just requesting that we break e2e tests out into its own job, rather than adding to the unit test job.

Comment thread .github/workflows/test-deploy.yml Resolved
Comment thread package.json Resolved
Comment thread test/e2e/run-cli.js Resolved
@lwasser
lwasser requested a review from michaelfaith November 8, 2026 18:37
@lwasser

lwasser commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

ready for a second review 🎉 so eslint wants the "linked" job order for needs: to be alphabetical now. I put them in the order they were run in the job but i suppose since they can run concurrently that order is less meaningful. 🤷🏻‍♀️

@michaelfaith

Copy link
Copy Markdown
Contributor

I put them in the order they were run

Yeah, they really run at the same time, so it'd be nice for the jobs to be in alphabetical order, so they're easier to find as we add more ci checks (e.g. typechecking after the TS migration). When there is an order, then having those in run order makes sense.

@michaelfaith michaelfaith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Thanks! 👍

@lwasser
lwasser merged commit f591a14 into all-contributors:main Nov 9, 2026
8 checks passed
@lwasser
lwasser deleted the end-to-end branch November 9, 2026 00:23
@a-c-slater a-c-slater Bot mentioned this pull request Nov 11, 2026
michaelfaith pushed a commit that referenced this pull request Nov 12, 2026
…ts of failure (#620)

This PR adds e2e tests for points of failure when config files like the
json file don't exist. here we raise a UserError and make the unit tests
associated with it a bit more explicit too. this pr is built on #616
#617 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: ci Changes to CI workflows type: tests Changes to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🧪 Test: Add end-to-end (mocked) tests to catch errors we are currently missing when the CLI deps and other changes happen

2 participants