Skip to content

Unit test shouldn't depend on local typesense server #35

Closed

Description

@snigdhasjg

Description

Unit test depends on local typesense server. And for unit tests developer need not to setup server on their own.

Steps to reproduce

Run the test on local

Expected Behavior

Developer need not to setup server on their own. Need to use test container & each test will have its own context. No contexts are shared.

Actual Behavior

Unit test fail without starting to local server on 8108 port. This is more error prone as tests might share state if forgot to reset.

Metadata

NA

Typesense Version: NA

OS: NA

Activity

  1. changed the title [-]Unit test shouldn'depends on local typesense server[/-] [+]Unit test shouldn't depend on local typesense server[/+] on Apr 30, 2023
  2. kishorenc commented on May 2, 2023

    @kishorenc
    Member

    We prefer having integration tests for the client since the client code is just a thin wrapper around the REST API. Mocking the responses from the server is not very useful because there is not much logic to unit test.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions