-
Notifications
You must be signed in to change notification settings - Fork 0
Test suite #51
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
Test suite #51
Conversation
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
], | ||
"baseUrl": "src" | ||
"types": ["bun"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh does this work for all DefinitelyTyped packages? If so that is cool. I have always added @types/bun
, etc here haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly I'm not sure if it applies to all cases of DT (or bundled/non-DT) packages, but nice lil shortcut for several that I've tried
Co-authored-by: Beau Hawkinson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests working the same as shown in screenshots.
Description
Task link: https://linear.app/omnidev/issue/OMNI-87/integrate-playwright-msw-for-e2e-testing, https://linear.app/omnidev/issue/OMNI-151/set-up-unit-test-framework-bun-vanilla-if-possible
Note
This PR is not intended to provide robust coverage over our existing codebase, rather to get the foundation started and merged in so we can agree on a clean config and then build out tests (including more fixtures, mocks, etc.) as a team later. Further, there are lots of TODOs introduced in this PR, but they are all incredibly related, mostly via pending app router support.
Warning
MSW does not currently fully support the Next.js app router, so E2E tests are skipped for now as a consequence. Track mswjs/examples#101. Once this is merged, it can be used as an integration reference, and the tests can be enabled.
Test Steps
Before testing the tests by testing them in a testful fashion, make sure to set the new environment variables (both adding the new ones and setting up
.env.test.local
).One specific question: is uploading E2E test artifacts useful in the first place? We could simplify the workflow and speed up execution time by skipping it. In the future, we will likely have a more robust CI integration with artifact uploads. This question is connected to the disabledDecision: scrapmerge_e2e_reports
job + corresponding TODOAnother question: instead ofDecision: consolidate.env.test.local
, it might be desirable to just load the local.env.local
if running E2E tests locally. Let me know thoughts on this! Had some annoyances getting it working but it might be nice, I'm not sure about long-term benefits leaning into the decision for either approachbun run test
(note that some are skipped, see colocated code for details)bun test:e2e
(note that these tests are skipped, see warning above; just make sure the command works)