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

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Initial @inngest/test package #704

wants to merge 18 commits into from

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
  • Added unit/integration tests
  • 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

⚠️ No Changeset found

Latest commit: 3bb13a6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a 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 0482dcc.

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
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.

3 participants