Add choice, remove AllMessages scenario
This commit is contained in:
@@ -18,6 +18,8 @@ export const flatten = <T>(xs: T[]) => xs.flatMap(identity)
|
||||
|
||||
export const uniq = <T>(xs: T[]) => Array.from(new Set(xs))
|
||||
|
||||
export const choice = <T>(xs: T[]): T => xs[Math.floor(xs.length * Math.random())]
|
||||
|
||||
export const shuffle = <T>(xs: T[]): T[] => xs.sort(() => Math.random() > 0.5 ? 1 : -1)
|
||||
|
||||
export const randomId = (): string => Math.random().toString().slice(2)
|
||||
|
||||
@@ -92,8 +92,6 @@ export class Router {
|
||||
|
||||
WriteRelays = () => this.scenario([this.getUserRelays()]).mode(RelayMode.Write)
|
||||
|
||||
AllMessages = () => this.scenario([this.getUserRelays()])
|
||||
|
||||
Messages = (pubkeys: string[]) =>
|
||||
this.scenario([
|
||||
this.getUserRelays(),
|
||||
|
||||
Reference in New Issue
Block a user