@moroo/wdio-slack-reporter
Version:
Reporter from WebdriverIO using Incoming webhook and Web API to send results to Slack.
1 lines • 1.41 kB
Source Map (JSON)
{"version":3,"sources":["../src/utils.ts"],"sourcesContent":["/**\n * Copyright (c) moroo\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport getLogger from '@wdio/logger';\n\nimport type { Logger } from '@wdio/logger';\n\n/**\n * Logger instance for the @moroo/wdio-slack-reporter package.\n * This logger is configured using the getLogger function and is used\n * throughout the package for consistent logging.\n */\nexport const logger: Logger = getLogger('@moroo/wdio-slack-reporter');\n\n/**\n * Waits for a specified amount of time.\n *\n * This function creates a promise that resolves after the specified number of milliseconds.\n * It can be used to pause execution in an async function using await.\n *\n * @param milliseconds - The number of milliseconds to wait\n * @returns A promise that resolves after the specified time\n *\n * @example\n * ```typescript\n * // Wait for 1 second\n * await waitForTimeout(1000);\n * ```\n */\nexport async function waitForTimeout(milliseconds: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, milliseconds));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,oBAAsB;AASf,MAAM,aAAiB,cAAAA,SAAU,4BAA4B;AAiBpE,eAAsB,eAAe,cAAqC;AACxE,SAAO,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,YAAY,CAAC;AACnE;","names":["getLogger"]}