-
Notifications
You must be signed in to change notification settings - Fork 43
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
Conversation
🦋 Changeset detectedLatest commit: 1452f4d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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 1452f4d. |
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
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @inngest/test@0.1.0 ### Minor Changes - [#704](#704) [`9438960`](9438960) Thanks [@jpwilliams](https://github.com/jpwilliams)! - Refactor `@inngest/test` to have a much simpler public API ## inngest@3.23.1 ### Patch Changes - [#657](#657) [`7ca9537`](7ca9537) Thanks [@jpwilliams](https://github.com/jpwilliams)! - Expose `EventSchemas` in `Inngest` instances - [#311](#311) [`a53356a`](a53356a) Thanks [@jpwilliams](https://github.com/jpwilliams)! - Add streaming capabilities to `"inngest/cloudflare"` handler Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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
Added a docs PR that references this PRN/A Package has a readme - will follow up with docsAdded unit/integration testsN/A Package still0.
- will pad out utests laterRelated
@inngest/test
package #688