Module 3 of 4 in Native Git in Postman
Continue with your Deskly API from the earlier Native Git modules. You write a coded mock that stands in for Deskly, run it with the Postman CLI, and add it to a CI workflow.
- You'll build
- A JavaScript mock of Deskly in your repo that runs locally and in GitHub Actions.
- Time
- About 30 min · 3 parts · 8 steps · progress saves as you go
- How it works
- You do each step, then click Validate and LiftOff checks your work. 5 of the 8 steps can't be checked automatically, so you click Done for those.
- You'll need
- A free Postman account and API key (connect it below)
- A few setup steps, shown below before you start
Connect a Postman API key to check your work
You do each step in Postman, then LiftOff uses your key to look at your workspace and confirm it's done. Connect once and it works for every module. Your key is saved in this browser and is only used to check your work in Postman.
Before you start
Complete Native Git in Postman and OpenAPI Specs with Native Git first. This module reuses the same public deskly-api fork, [Your name] - Native Git workspace, connected local folder, Deskly API collection, and (ideally) your OpenAPI spec on a feature/ branch.
When you reopen Postman, Local View may show main in the bottom left — checkout your feature/ branch before the collection appears in the sidebar (Part 2 Step 1 walks you through this).
You'll also need:
- Postman desktop app — Native Git, Local View, and local mocks are desktop-only.
- Git and your existing
deskly-apiclone connected to the workspace. - A public GitHub fork with your collection already pushed on a
feature/branch. - The Postman CLI for Part 3 (
postman mock run) — see the Postman CLI docs.
Confirm Your Deskly Setup
Confirm your fork and collection are still on GitHub before you add the mock.
Build a Stand-in for Deskly
Create a coded mock in Local View — JavaScript handlers under postman/mocks/ that stand in for Deskly so consumers (and CI) don't need the real Express process.
Run the Stand-in with the Postman CLI and Push to Git
Start the same mock with postman mock run against your scenario .js file, add a CI workflow, push to your public fork, and confirm the GitHub Action health-checks the mock.