UNPKG

@gatling.io/core

Version:

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

10 lines (9 loc) 497 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.doSwitchImpl = void 0; const session_1 = require("../session"); const wrapOn = (jvmOn, wrap) => ({ on: (...choices) => wrap(jvmOn.on(choices.map((c) => c._underlying))) }); const doSwitchImpl = (jvmDoSwitch, wrap) => (actual) => wrapOn(typeof actual === "function" ? jvmDoSwitch.doSwitch((0, session_1.underlyingSessionTo)(actual)) : jvmDoSwitch.doSwitch(actual), wrap); exports.doSwitchImpl = doSwitchImpl;