Sha256: dbc403d57874e6d727960e64ca410fdf0932bdb3157ff8db81aee07e3f1518c7
Contents?: true
Size: 1.13 KB
Versions: 26
Compression:
Stored size: 1.13 KB
Contents
import { devUtils } from '~/core/utils/internal/devUtils' export interface PrintStartMessageArgs { quiet?: boolean message?: string workerUrl?: string workerScope?: string } /** * Prints a worker activation message in the browser's console. */ export function printStartMessage(args: PrintStartMessageArgs = {}) { if (args.quiet) { return } const message = args.message || 'Mocking enabled.' // eslint-disable-next-line no-console console.groupCollapsed( `%c${devUtils.formatMessage(message)}`, 'color:orangered;font-weight:bold;', ) // eslint-disable-next-line no-console console.log( '%cDocumentation: %chttps://mswjs.io/docs', 'font-weight:bold', 'font-weight:normal', ) // eslint-disable-next-line no-console console.log('Found an issue? https://github.com/mswjs/msw/issues') if (args.workerUrl) { // eslint-disable-next-line no-console console.log('Worker script URL:', args.workerUrl) } if (args.workerScope) { // eslint-disable-next-line no-console console.log('Worker scope:', args.workerScope) } // eslint-disable-next-line no-console console.groupEnd() }
Version data entries
26 entries across 26 versions & 1 rubygems