mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-28 03:24:05 +00:00
* init load tests * add machine pat * setup app * add introspect * use xk6-modules repo * logging * add teardown * add manipulate user * add manipulate user * remove logs * convert tests to ts * add readme * zitadel * review comments
19 lines
435 B
TypeScript
19 lines
435 B
TypeScript
import { options } from 'k6/http';
|
|
import { Config } from './config';
|
|
|
|
export type options = {
|
|
searchParams?: { [name: string]: string };
|
|
};
|
|
|
|
export default function url(path: string, options: options = {}) {
|
|
let url = new URL(Config.host + path);
|
|
|
|
if (options.searchParams) {
|
|
Object.entries(options.searchParams).forEach(([key, value]) => {
|
|
url.searchParams.append(key, value);
|
|
});
|
|
}
|
|
|
|
return url.toString();
|
|
}
|