chore: lint + bump deps

This commit is contained in:
liyasthomas
2021-11-04 18:23:50 +05:30
parent ad76d100ee
commit 9e74a8c2e7
32 changed files with 1248 additions and 1265 deletions

View File

@@ -1,7 +1,11 @@
import { pipe } from "fp-ts/lib/function"
import { chain, right } from "fp-ts/lib/TaskEither"
import { execPreRequestScript } from "./preRequest"
import { execTestScript, TestResponse, TestDescriptor as _TestDescriptor } from "./test-runner"
import {
execTestScript,
TestResponse,
TestDescriptor as _TestDescriptor,
} from "./test-runner"
export type TestDescriptor = _TestDescriptor
/**
@@ -9,13 +13,11 @@ export type TestDescriptor = _TestDescriptor
* @param testScript The string of the script to run
* @returns A TaskEither with an error message or a TestDescriptor with the final status
*/
export const runTestScript = (
testScript: string,
response: TestResponse
) => pipe(
execTestScript(testScript, response),
chain((results) => right(results[0])) // execTestScript returns an array of descriptors with a single element (extract that)
)
export const runTestScript = (testScript: string, response: TestResponse) =>
pipe(
execTestScript(testScript, response),
chain((results) => right(results[0])) // execTestScript returns an array of descriptors with a single element (extract that)
)
/**
* Executes a given pre-request script on the sandbox
@@ -23,4 +25,4 @@ export const runTestScript = (
* @param env The envirionment variables active
* @returns A TaskEither with an error message or an array of the final environments with the all the script values applied
*/
export const runPreRequestScript = execPreRequestScript
export const runPreRequestScript = execPreRequestScript