UNPKG

@gatling.io/core

Version:

Gatling JS is a JavaScript/TypeScript interface for the [Gatling load testing tool](https://gatling.io/).

12 lines (11 loc) 596 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.randomSwitchOrElseImpl = void 0; const wrapOn = (jvmOn, wrap) => ({ on: (...choices) => wrapOrElse(jvmOn.on(choices.map((c) => c._underlying)), wrap) }); const wrapOrElse = (jvmOrElse, wrap) => ({ orElse: (executable, ...executables) => wrap(jvmOrElse.orElse(executable._underlying, ...executables.map((e) => e._underlying))) }); const randomSwitchOrElseImpl = (jvmRandomSwitch, wrap) => () => wrapOn(jvmRandomSwitch.randomSwitchOrElse(), wrap); exports.randomSwitchOrElseImpl = randomSwitchOrElseImpl;