UNPKG

@gatling.io/http

Version:

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

17 lines (16 loc) 772 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.poll = void 0; const jvm_types_1 = require("@gatling.io/jvm-types"); const core_1 = require("@gatling.io/core"); /** The prefix to bootstrap polling specific DSL */ const poll = () => wrapPolling(jvm_types_1.HttpDsl.poll()); exports.poll = poll; const wrapPolling = (_underlying) => ({ pollerName: (pollerName) => wrapPolling(_underlying.pollerName(pollerName)), every: (period) => wrapPollingEvery(_underlying.every((0, core_1.toJvmDuration)(period))), stop: () => (0, core_1.wrapActionBuilder)(_underlying.stop()) }); const wrapPollingEvery = (_underlying) => ({ exec: (requestBuilder) => (0, core_1.wrapActionBuilder)(_underlying.exec(requestBuilder._underlying)) });