Skip to content

docs: import AuthService in mocking tutorial#3135

Open
fibibot wants to merge 1 commit into
mainfrom
orch/issue-112
Open

docs: import AuthService in mocking tutorial#3135
fibibot wants to merge 1 commit into
mainfrom
orch/issue-112

Conversation

@fibibot
Copy link
Copy Markdown
Contributor

@fibibot fibibot commented May 16, 2026

Summary

  • Move the real-world mocking tutorial AuthService example into an application module snippet.
  • Update the test snippet to import AuthService from that module.
  • Keep the test steps focused on credential validation, fetch stubbing, method spying, and fake time.

Verification

  • deno fmt --check examples/tutorials/mocking.md
  • Extracted auth_service.ts and auth_service_test.ts snippets from examples/tutorials/mocking.md, then ran deno test on the extracted test file
  • deno task build:light, blocked by missing generated reference data: reference_gen/gen/deno.json

Fixes #2891
Closes bartlomieju/orchid-inbox#112

Copy link
Copy Markdown
Contributor

@lunadogbot lunadogbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The split into auth_service.ts and auth_service_test.ts fixes the missing import context, and the expiration step now awaits login() before advancing FakeTime. I checked FakeTime(new Date(...)) and the std testing imports against current Deno/std resolution. No issues found. Approving.

@lunadogbot
Copy link
Copy Markdown
Contributor

@bartlomieju this is ready to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feedback: /examples/mocking_tutorial/ - Needs Improvement

2 participants