https://github.com/searchkit/searchkit
Raw File
Tip revision: a2b9df68a9e460992dd594fcc2c344c73d228c72 authored by Joseph McElroy on 30 March 2024, 19:59:20 UTC
4.11.2 release
Tip revision: a2b9df6
DEVELOPMENT.md
## Setting up a development environment

Requirements:
- [Node.js](https://nodejs.org/en/) (18 or higher)
- [Yarn](https://yarnpkg.com/) (v1.22.15 or higher)

1. Clone the repository and install dependencies:

```bash
yarn
```

2. Build the project:

```bash
yarn build
```

## Running Tests

We use [Jest](https://jestjs.io/) for testing. To run the tests, run `yarn test` from the root of the project.

```bash
yarn test
```

or running it in a particular package:

```bash
cd packages/searchkit
yarn test
```

## Functional Tests

These tests run against mocks of the Elasticsearch API. 

Tests are located in the `packages/searchkit/src/___tests___/functional` directory.
Mocks are located in the `packages/searchkit/src/___tests___/mocks` directory.

We use `nock` to mock the HTTP request to Elasticsearch, returning a apprioriate response with a mock.

To run the functional tests, run `yarn test` from within the `packages/searchkit` directory.

```bash
cd packages/searchkit
yarn test
```

```bash
back to top