MCPcopy
hub / github.com/vitejs/vite / untilConsoleLogAfter

Function untilConsoleLogAfter

playground/hmr-ssr/__tests__/hmr-ssr.spec.ts:977–993  ·  view source on GitHub ↗
(
  operation: () => any,
  target: string | RegExp | Array<string | RegExp>,
  arg3?: boolean | UntilBrowserLogAfterCallback,
  arg4?: UntilBrowserLogAfterCallback,
)

Source from the content-addressed store, hash-verified

975 callback?: UntilBrowserLogAfterCallback,
976): Promise<string[]>
977export async function untilConsoleLogAfter(
978 operation: () => any,
979 target: string | RegExp | Array<string | RegExp>,
980 arg3?: boolean | UntilBrowserLogAfterCallback,
981 arg4?: UntilBrowserLogAfterCallback,
982): Promise<string[]> {
983 const expectOrder = typeof arg3 === 'boolean' ? arg3 : false
984 const callback = typeof arg3 === 'boolean' ? arg4 : arg3
985
986 const promise = untilConsoleLog(target, expectOrder)
987 await operation()
988 const logs = await promise
989 if (callback) {
990 await callback(logs)
991 }
992 return logs
993}
994
995async function untilConsoleLog(
996 target?: string | RegExp | Array<string | RegExp>,

Callers 2

hmr-ssr.spec.tsFile · 0.85
testStarExportsFunction · 0.85

Calls 2

untilConsoleLogFunction · 0.85
callbackFunction · 0.85

Tested by

no test coverage detected