-
Notifications
You must be signed in to change notification settings - Fork 40
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
Initial @inngest/test
package
#704
base: main
Are you sure you want to change the base?
Conversation
|
A user has added the prerelease/test label, so this PR will be published to npm with the tag You can install this prerelease version with: npm install @inngest/test@pr-704 The last release was built and published from 0482dcc. |
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.
User reported issue using this with vitest where Jest complains:
Do not import `@jest/globals` outside of the Jest test environment
There may be a couple ways to fix this:
- Add
jest-mock
todependencies
(currently Jest is in dev deps only) and use that as a standalone package that is agnostic to the runner. Also needs to remove the internalexpect
. - Use a different mocking implementation like vitest's
@vitest/spy
…710) ## Summary <!-- Succinctly describe your change, providing context, what you've changed, and why. --> For `@inngest/test` (#704), we need access to the internal promise that we send to userland code so that we can access its output for state assertions. ## Checklist <!-- Tick these items off as you progress. --> <!-- If an item isn't applicable, ideally please strikeout the item by wrapping it in "~~"" and suffix it with "N/A My reason for skipping this." --> <!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" --> - [ ] ~Added a [docs PR](https://github.com/inngest/website) that references this PR~ N/A - [ ] ~Added unit/integration tests~ N/A - [ ] Added changesets if applicable ## Related <!-- A space for any related links, issues, or PRs. --> <!-- Linear issues are autolinked. --> <!-- e.g. - INN-123 --> <!-- GitHub issues/PRs can be linked using shorthand. --> <!-- e.g. "- inngest/inngest#123" --> <!-- Feel free to remove this section if there are no applicable related links.--> - #704
Summary
The initial bare-bones release of
@inngest/test
based on the RFC at inngest/inngest#1680 following the preliminary changes to open up the execution APIs in #688.To see how to use the library in its current state, see
README.md
.Checklist
Related
@inngest/test
package #688