mirror of
https://github.com/vacp2p/libp2p-test-plans.git
synced 2026-01-08 21:07:59 -05:00
Trying to debug these tests in CI is incredibly difficult and since they depend on older versions of previously published modules, if something breaks due to a bug in released code it's very hard to fix it. Instead follow the pattern in the perf tests and include the full test implementations here.
13 lines
296 B
TypeScript
13 lines
296 B
TypeScript
export async function redisProxy (commands: any[]): Promise<any> {
|
|
const res = await fetch(`http://localhost:${process.env.REDIS_PROXY_PORT}`, {
|
|
method: 'POST',
|
|
body: JSON.stringify(commands)
|
|
})
|
|
|
|
if (!res.ok) {
|
|
throw new Error('Redis command failed')
|
|
}
|
|
|
|
return res.json()
|
|
}
|