feat(test-utils): add testAllAuto method for automatic cluster test generation by bobymicroby · Pull Request #3148 · redis/node-redis

@bobymicroby changed the title feat(test-utils): add testAllAuto method for automatic cluster test generation [WIP] feat(test-utils): add testAllAuto method for automatic cluster test generation

Dec 16, 2025

@bobymicroby

…eneration

Created a new `testAllAuto()` helper method in the test-utils package that automatically runs tests against both
single-node and cluster instances with auto-generated cluster configuration from client configuration.

Previously, tests only ran against single-node clients using `testWithClient()`. To test both scenarios, developers had
to either manually call `testWithCluster()` separately with hand-crafted cluster config, or use `testAll()` with both
client and cluster configurations defined.

The new `testAllAuto()` method converts client configuration to cluster configuration by separating cluster-level
properties (`modules`, `functions`, `scripts`) from client-level properties (`password`, `socket`, etc.), placing them
at `clusterConfiguration` level and `clusterConfiguration.defaults` respectively.

Example usage:

Before:

```
testUtils.testWithClient('client.ft.aggregate', async client => {...}, GLOBAL.SERVERS.OPEN)

```

After:

```
testUtils.testAllAuto('client.ft.aggregate', async client => {...}, GLOBAL.SERVERS.OPEN)
```

Changes:
- Added `testAllAuto()` method in packages/test-utils/lib/index.ts
- Updated AGGREGATE.spec.ts to use the new method as example

@bobymicroby bobymicroby changed the title [WIP] feat(test-utils): add testAllAuto method for automatic cluster test generation feat(test-utils): add testAllAuto method for automatic cluster test generation

Jan 6, 2026

nkaradzhov