René's URL Explorer Experiment


Title: [TRI-1127] Improvement: Add a `@trigger.dev/testing` package that allows for unit testing job runs · Issue #379 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: [TRI-1127] Improvement: Add a `@trigger.dev/testing` package that allows for unit testing job runs · Issue #379 · triggerdotdev/trigger.dev

X Title: [TRI-1127] Improvement: Add a `@trigger.dev/testing` package that allows for unit testing job runs · Issue #379 · triggerdotdev/trigger.dev

Description: Currently, we don't have a clean way of unit testing jobs, it would be nice to have a @trigger.dev/testing package that could be used to do test job runs with mocked io and make assertions: const jobToTest = client.defineJob({ id: "strip...

Open Graph Description: Currently, we don't have a clean way of unit testing jobs, it would be nice to have a @trigger.dev/testing package that could be used to do test job runs with mocked io and make assertions: const j...

X Description: Currently, we don't have a clean way of unit testing jobs, it would be nice to have a @trigger.dev/testing package that could be used to do test job runs with mocked io and make assertions: con...

Mail addresses
hello@trigger.dev

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/379

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[TRI-1127] Improvement: Add a `@trigger.dev/testing` package that allows for unit testing job runs","articleBody":"Currently, we don't have a clean way of unit testing jobs, it would be nice to have a `@trigger.dev/testing` package that could be used to do test job runs with mocked `io` and make assertions:\r\n\r\n```ts\r\nconst jobToTest = client.defineJob({\r\n  id: \"stripe-example-1\",\r\n  name: \"Stripe Example 1\",\r\n  version: \"0.1.0\",\r\n  trigger: eventTrigger({\r\n    name: \"stripe.example\",\r\n    schema: z.object({\r\n      customerId: z.string(),\r\n      source: z.string(),\r\n    }),\r\n  }),\r\n  integrations: {\r\n    stripe,\r\n  },\r\n  run: async (payload, io, ctx) => {\r\n    await io.stripe.createCharge(\"create-charge\", {\r\n      amount: 100,\r\n      currency: \"usd\",\r\n      source: payload.source,\r\n      customer: payload.customerId,\r\n    });\r\n  },\r\n});\r\n\r\nimport { testJob } from \"@trigger.dev/testing\";\r\n\r\n// Inside a test file\r\nconst testRun = testJob(jobToTest, {\r\n  payload: {\r\n    customerId: \"cus_123\",\r\n    source: \"src_123\",\r\n  },\r\n});\r\n\r\nexpect(testRun).toHaveSucceeded();\r\n// Test the stripe charge was called with the correct params\r\nexpect(testRun.io.stripe.createCharge).toHaveBeenCalledWith(\"create-charge\", {\r\n  amount: 100,\r\n  currency: \"usd\",\r\n  source: \"src_123\",\r\n});\r\n```\n\n\u003csub>[TRI-1127](https://linear.app/triggerdotdev/issue/TRI-1127/improvement-add-a-triggerdevtesting-package-that-allows-for-unit)\u003c/sub>","author":{"url":"https://github.com/ericallam","@type":"Person","name":"ericallam"},"datePublished":"2023-08-21T20:50:00Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/379"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:38b39fb0-2f47-c9f2-9566-d05f09083f6e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB94A:346C31:511E3C:72F636:6AFB06FF
html-safe-nonce931382101c976cff2132778d99711b20f4d57db85d0cf9ef33fcdc5483522e51
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTRBOjM0NkMzMTo1MTFFM0M6NzJGNjM2OjZBRkIwNkZGIiwidmlzaXRvcl9pZCI6IjQ1MTU1NzI1NzYzNTI0MDUyNDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0d441756585ba42bcd79c022d7fdb333c5703a4d83ecfa6112c28d41ec83d5f6
hovercard-subject-tagissue:1860129504
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/triggerdotdev/trigger.dev/379/issue_layout
twitter:imagehttps://opengraph.githubassets.com/349c72e76703a4b4bdc8c1819ef77c96f06e6573fc2bb6015571011752c67b24/triggerdotdev/trigger.dev/issues/379
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/349c72e76703a4b4bdc8c1819ef77c96f06e6573fc2bb6015571011752c67b24/triggerdotdev/trigger.dev/issues/379
og:image:altCurrently, we don't have a clean way of unit testing jobs, it would be nice to have a @trigger.dev/testing package that could be used to do test job runs with mocked io and make assertions: const j...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameericallam
hostnamegithub.com
expected-hostnamegithub.com
None76fb13cb43f1834708971f45a9cfcab5df3177a7582086613d7cdc6e98c4bfde
turbo-cache-controlno-preview
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseafc998826cdd963c8f91a96ae5372809ab5e296b
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/issues/379#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2F379
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2F379
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/379
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/379
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/379
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
https://github.com/triggerdotdev/trigger.dev
New issuehttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/379
New issuehttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/379
#432https://github.com/triggerdotdev/trigger.dev/pull/432
[TRI-1127] Improvement: Add a @trigger.dev/testing package that allows for unit testing job runshttps://github.com/triggerdotdev/trigger.dev/issues/379#top
#432https://github.com/triggerdotdev/trigger.dev/pull/432
ImprovementCreated by Linear-GitHub Synchttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22Improvement%22
area/serverIssues related to the Trigger.dev serverhttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22area%2Fserver%22
area/testshttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22area%2Ftests%22
💎 Bountyhttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22%F0%9F%92%8E%20Bounty%22
💰 Rewardedhttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22%F0%9F%92%B0%20Rewarded%22
https://github.com/ericallam
ericallamhttps://github.com/ericallam
on Aug 21, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#issue-1860129504
TRI-1127https://linear.app/triggerdotdev/issue/TRI-1127/improvement-add-a-triggerdevtesting-package-that-allows-for-unit
ImprovementCreated by Linear-GitHub Synchttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22Improvement%22
on Aug 21, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#event-10150423870
area/serverIssues related to the Trigger.dev serverhttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22area%2Fserver%22
on Aug 21, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#event-10150423875
area/testshttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22area%2Ftests%22
on Aug 21, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#event-10150423884
ericallamhttps://github.com/ericallam
on Aug 21, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#event-10150423931
https://github.com/ericallam
ericallamhttps://github.com/ericallam
on Aug 21, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#issuecomment-1687071295
https://github.com/ericallam
ericallamhttps://github.com/ericallam
on Aug 21, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#issuecomment-1687072074
https://github.com/ericallam
ericallamhttps://github.com/ericallam
on Sep 1, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#issuecomment-1703326571
https://github.com/ericallam
ericallamhttps://github.com/ericallam
on Sep 1, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#issuecomment-1703326699
https://github.com/apps/algora-pbc
algora-pbchttps://github.com/apps/algora-pbc
on Sep 1, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#issuecomment-1703326744
receive payoutshttps://docs.algora.io/bounties/payments#country-support
@nicktrnhttps://github.com/nicktrn
#432https://github.com/triggerdotdev/trigger.dev/pull/432
algora-pbchttps://github.com/apps/algora-pbc
💎 Bountyhttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22%F0%9F%92%8E%20Bounty%22
on Sep 1, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#event-10261012366
https://github.com/nicktrn
nicktrnhttps://github.com/nicktrn
on Sep 1, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#issuecomment-1703338498
#379https://github.com/triggerdotdev/trigger.dev/issues/379
Cancel my attempt https://console.algora.io/api/bounties/clm13fz2e0002mp0ggrshjafs/cancel-attempt
https://github.com/apps/algora-pbc
algora-pbchttps://github.com/apps/algora-pbc
on Sep 4, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#issuecomment-1705641336
@nicktrnhttps://github.com/nicktrn
pull requesthttps://github.com/triggerdotdev/trigger.dev/pull/432
visit your org dashboardhttps://console.algora.io/org/triggerdotdev/bounties
matt-aitkenhttps://github.com/matt-aitken
completedhttps://github.com/triggerdotdev/trigger.dev/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#432https://github.com/triggerdotdev/trigger.dev/pull/432
on Sep 11, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#event-10333639540
https://github.com/apps/algora-pbc
algora-pbchttps://github.com/apps/algora-pbc
on Sep 11, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#issuecomment-1713795861
@nicktrnhttps://github.com/nicktrn
algora-pbchttps://github.com/apps/algora-pbc
💰 Rewardedhttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22%F0%9F%92%B0%20Rewarded%22
on Sep 11, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#event-10333641960
triggerdotdevhttps://github.com/triggerdotdev
algora-pbchttps://github.com/algora-pbc
on Sep 11, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#event-10333652851
https://github.com/matt-aitken
matt-aitkenhttps://github.com/matt-aitken
on Sep 11, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#issuecomment-1713797565
@nicktrnhttps://github.com/nicktrn
https://github.com/apps/algora-pbc
algora-pbchttps://github.com/apps/algora-pbc
on Sep 11, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#issuecomment-1713797861
@nicktrnhttps://github.com/nicktrn
https://github.com/matt-aitken
matt-aitkenhttps://github.com/matt-aitken
on Sep 11, 2023https://github.com/triggerdotdev/trigger.dev/issues/379#issuecomment-1713812590
@nicktrnhttps://github.com/nicktrn
Sign up for freehttps://github.com/signup?return_to=https://github.com/triggerdotdev/trigger.dev/issues/379
Sign in to commenthttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/379
ImprovementCreated by Linear-GitHub Synchttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22Improvement%22
area/serverIssues related to the Trigger.dev serverhttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22area%2Fserver%22
area/testshttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22area%2Ftests%22
💎 Bountyhttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22%F0%9F%92%8E%20Bounty%22
💰 Rewardedhttps://github.com/triggerdotdev/trigger.dev/issues?q=state%3Aopen%20label%3A%22%F0%9F%92%B0%20Rewarded%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.