Skip to content

Commit

Permalink
for-devs.md update
Browse files Browse the repository at this point in the history
  • Loading branch information
light-source committed Dec 10, 2024
1 parent e58f0d1 commit d311cd6
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions for-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,14 @@
This file is intended for developers. It provides details on the project's structure and instructions on how to work
with it.

### 1. Fixed Node Version Warning

The project requires Node.js version 20 and is not compatible with later versions. You can
use [Node Version Manager (NVM)](https://github.com/nvm-sh/nvm) to manage your Node.js versions.

### 2. Commands
### 1. Commands

* Installation: `npm install`
* Building packages: `npm run build:all`
* Building the bundle: `npm run build:bundle`
* Linting: `npm run lint-fix` (formatting & code validation)

### 3. Environment Setup for Tests (Once)
### 2. Environment Setup for Tests (Once)

To set up the environment for testing, run the following commands:

Expand All @@ -29,9 +24,9 @@ cp dev/scripts/env.test packages/cli/.env.test
cp dev/scripts/env.test packages/procaptcha-bundle/.env.test
```

### 4. Running E2E Client Tests Locally
### 3. Running E2E Client Tests Locally

#### 4.1) Launching services
#### 3.1) Launching services

The DB is docked, and to start the DB service, run the following:

Expand All @@ -51,23 +46,23 @@ NODE_ENV=test npm run start:demo
NODE_ENV=test npm run start:provider:admin
```

#### 4.2) Running the Tests
#### 3.2) Running the Tests

```
NODE_ENV=test npm run -w @prosopo/cypress-shared cypress:open:client-example
```

#### 4.3) Stopping Docker Services
#### 3.3) Stopping Docker Services

After the tests finish, stop the Docker services with:

```
docker compose --file ./docker/docker-compose.test.yml down
```

### 5. Running E2E Bundle Tests Locally
### 4. Running E2E Bundle Tests Locally

#### 5.1) Launching Services
#### 4.1) Launching Services

For bundle tests, use the same services as for the E2E client tests, plus the following:

Expand All @@ -76,7 +71,7 @@ NODE_ENV="development" npm -w @prosopo/procaptcha-bundle run bundle
NODE_ENV=test npm run start:bundle
```

#### 5.2) Running the Tests
#### 4.2) Running the Tests

```
NODE_ENV=test npm -w @prosopo/cypress-shared run cypress:open:client-bundle-example
Expand Down

0 comments on commit d311cd6

Please sign in to comment.