# nc-calc-server Tests

This directory contains tests for the nc-calc-server plugin conversion functions.

## Test Files

- `product-convert.test.js` - Tests for product conversion functions in `convert/product-convert.js`
- `test-data.json` - Real product data from the system used for testing

## Running Tests

From `/Volumes/nc/nc-backend`:

```bash
# Run tests in watch mode
pnpm test

# Run tests once
pnpm test:run

# Run tests with UI
pnpm test:ui
```

## Test Data

Tests use real product data from `test-data.json`:

- **WASHER 8*25** (default, simple multipliers: unit_multiplier=100, others=1)
- **TUBE 90X90X4** (complex multipliers)
- **TUBE 60X40X3** (complex multipliers)
- **SSH 4*1000*2000** (with design_conversion_multiplier=-1)
