Options
All
  • Public
  • Public/Protected
  • All
Menu

@unifed/backend-testing

This package contains code used for testing the backend; it is not used in production. This includes helper functions for generating fake posts, users and communities, as well as database setup and teardown routines.

Index

Functions

Const generateCommunities

  • generateCommunities(n: number): Community[]

Const generateCommunity

  • generateCommunity(): Community

Const generatePost

  • generatePost(community: string): Post

Const generateUser

  • generateUser(): User

Const setup

  • setup(test: TestInterface<unknown>): void
  • Sets up and tears down the database before and after each test.

    Parameters

    • test: TestInterface<unknown>

      the test to be run after the database is set up.

    Returns void

Generated using TypeDoc