Skip to content

Add unit testing guide - #841

Open
mtuchi wants to merge 2 commits into
mainfrom
unit-testing
Open

mtuchi wants to merge 2 commits into
mainfrom
unit-testing

Conversation

@mtuchi

@mtuchi mtuchi commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Short Description

Adds a new docs page, "Writing unit tests for your jobs", covering how to compile job code with openfn compile --exports-only and test the helper functions with a standard JavaScript test runner. Cross-linked from the job writing guide and the two CLI pages.

Closes #840

Details

  • New page docs/jobs/unit-testing-jobs.md, added to the sidebar under Write Jobs, after jobs/compilation
  • docs/jobs/job-writing-guide.md picks up a short "your helpers can be unit tested" pointer in Next Steps
  • docs/build-for-developers/cli-intro.md gains a bullet in the "you can use the OpenFn CLI to..." list
  • docs/build-for-developers/cli-usage.md gains a "Compile job code for unit testing" section

Walk through video

AI Usage

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

@mtuchi mtuchi changed the title wip: unit testing docs Add unit testing guide Sep 16, 2026
@mtuchi
mtuchi requested a review from PiusKariuki September 16, 2026 09:03
@mtuchi
mtuchi marked this pull request as ready for review September 16, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

add a guide on unit testing job code

2 participants