"Aha!"
A workflow engine, for monitoring and orchestrating a graph of processes that depend on each other.
| const { Builder, By, until } = require("selenium-webdriver"); | |
| const tcpPortUsed = require("tcp-port-used"); | |
| const { exec } = require("child_process"); | |
| process.env.SELENIUM_BROWSER = "chrome:75:LINUX"; | |
| process.env.SELENIUM_REMOTE_URL = "http://localhost:4444/wd/hub"; | |
| let driver = () => { | |
| const result = new Builder().forBrowser("chrome").build(); | |
| driver = () => result; |
| export type ReturnValue<T> = T extends (...args: any[]) => infer RETURN | |
| ? RETURN | |
| : T; | |
| export type Args<T> = T extends (...args: infer ARGS) => any | |
| ? ARGS | |
| : []; | |
| export type CallAsStep<C, T> = (...args: Args<T>) => Step<C, Promise<Resolve<ReturnValue<T>>>>; | |
| export type StepGenerator<C, T> = { [K in keyof T]: CallAsStep<C, T[K]> }; | |
| export type Resolve<T> = T extends Promise<infer U> ? U :T; |
| export interface Vars<T> { | |
| /** | |
| * Returns a step that assigns the result of step to key k. | |
| * | |
| * Always returns void, so if the step returned a promise set() won't block. | |
| * | |
| * You can: | |
| * | |
| * // will NOT block on stepThatCompletesEventually return value | |
| * set('value',stepThatCompletesEventually), |
| import {marbles} from "rxjs-marbles"; | |
| export function partitions<T>( | |
| source: ObservableInput<T>, | |
| p1: ((value: T, index: number) => boolean), | |
| ): [Observable<T>, Observable<T>] ; | |
| export function partitions<T>( | |
| source: ObservableInput<T>, | |
| p1: ((value: T, index: number) => boolean), |
| // Quick and easy | |
| // add correlation id to app logs | |
| // set correlation id in test steps (but ignore user-specified correlation id in production) | |
| log.anonymised({some:"log"}); | |
| log.sensitive(() => {some:"log"}); | |
| log.sensitive({some:"log"}); | |
| // Maybe inconvenient, and maybe we don't need it |
| (ns pierrepoint.di | |
| (:require [clojure.string :as st] | |
| [potemkin.collections :refer [def-map-type keys*]]) | |
| (:import [java.util NoSuchElementException UUID Map] | |
| [java.lang.reflect Method] | |
| [clojure.lang RestFn Fn ArityException IDeref] | |
| [java.lang AutoCloseable])) | |
| ; Utils | |
| ; ================================== |
| (ns midje.contrib.midje-schema | |
| (:require [schema.core :as sch] | |
| [schema.coerce :as coer] | |
| [schema.utils :as utils] | |
| [schema.macros :as macros] | |
| [midje.checking.core :refer [as-data-laden-falsehood]] | |
| [clj-time.core :refer [now minutes seconds millis plus minus after? interval within?]] | |
| [clojure.pprint :refer [pprint]] | |
| [clojure.stacktrace :refer [print-cause-trace]] | |
| )) |
| (defprotocol Foo (one [this]) | |
| (two [this arg])) | |
| (def echo-foo | |
| (reify | |
| Foo | |
| (one [this] "test") | |
| (two [this arg] arg))) | |
| (defn delegating-s-expression [this-symbol sig arglist] |
| package au.com.sheep; | |
| import org.hamcrest.Matcher; | |
| import org.junit.Test; | |
| import org.mockito.Matchers; | |
| import java.util.List; | |
| import static au.com.sheep.MockitoMatcherRecorder.record; | |
| import static org.hamcrest.MatcherAssert.assertThat; |