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

Initial @inngest/test package #704

Merged
merged 21 commits into from
Oct 21, 2024
Merged

Initial @inngest/test package #704

merged 21 commits into from
Oct 21, 2024

Conversation

jpwilliams
Copy link
Member

@jpwilliams jpwilliams commented Sep 7, 2024

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 PR N/A Package has a readme - will follow up with docs
  • Added unit/integration tests N/A Package still 0. - will pad out utests later
  • Added changesets if applicable

Related

@jpwilliams jpwilliams added the prerelease/test Create snapshot releases for a PR for the "@inngest/test" package. label Sep 7, 2024
@jpwilliams jpwilliams self-assigned this Sep 7, 2024
Copy link

changeset-bot bot commented Sep 7, 2024

🦋 Changeset detected

Latest commit: 1452f4d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@inngest/test Minor

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

@inngest-release-bot
Copy link
Collaborator

inngest-release-bot commented Sep 7, 2024

A user has added the prerelease/test label, so this PR will be published to npm with the tag pr-704. It will be updated with the latest changes as you push commits to this PR.

You can install this prerelease version with:

npm install @inngest/test@pr-704

The last release was built and published from 1452f4d.

Copy link
Member

@djfarrelly djfarrelly left a 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:

  1. Add jest-mock to dependencies (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 internal expect.
  2. Use a different mocking implementation like vitest's @vitest/spy

jpwilliams added a commit that referenced this pull request Sep 12, 2024
…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
@jpwilliams jpwilliams marked this pull request as ready for review October 14, 2024 12:16
@jpwilliams jpwilliams merged commit 9438960 into main Oct 21, 2024
48 checks passed
@jpwilliams jpwilliams deleted the feat/inngest-test branch October 21, 2024 16:08
jpwilliams pushed a commit that referenced this pull request Oct 21, 2024
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 @inngest/test prerelease/test Create snapshot releases for a PR for the "@inngest/test" package.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants