Skip to content

Add a provider-adapter contract test harness #12

Description

@brudex

Proposed labels: testing, area:providers, good first issue

Context

Hype Engine routes provider behavior through its platform-service registry,
but its provider adapters do not share root-level contract coverage. A small
mocked test harness would make adapter expectations explicit without using
real provider accounts or tokens.

Suggested starting points

  • services/platform/index.js
  • provider adapter modules under services/platform/
  • test/ (the repository's existing Node test suite)

Scope

Introduce a focused test helper and contract tests that verify supported
adapters expose testCredentials and publishPost. Cover safe structured
failure behavior for incomplete fixtures, including the Instagram-to-Facebook
alias. Mock all HTTP boundaries.

Non-goals

  • Do not add or change provider credentials.
  • Do not make real HTTP requests, publish content, or refactor provider
    implementation details beyond the minimum test seam.

Acceptance criteria

  • The supported registry adapters satisfy the documented interface.
  • Incomplete test fixtures produce a safe, structured failure rather than an
    uncaught exception or secret-bearing log.
  • The Instagram alias resolves to the intended Facebook publishing path.
  • The new tests make no network calls and pass with npm test.

Verification

  1. Run npm test with the new tests included.
  2. Confirm the tests use fakes/mocks and do not read environment provider
    tokens.
  3. Run git diff --check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:providersSocial provider integrationsgood first issueGood for newcomerstestingTest coverage and test infrastructure

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions