How to use the @boost/debug/lib/testing.mockDebugger function in @boost/debug

To help you get started, we’ve selected a few @boost/debug examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github milesj / boost / packages / core / src / testUtils.ts View on Github external
...options,
  });

  // Register default plugins
  if (injectPlugin) {
    // @ts-ignore Ignore this for convenience
    tool.registerPlugin('plugin', Plugin);
  }

  // Stub out standard objects
  tool.args = stubArgs();
  tool.config = stubToolConfig(config);
  tool.package = stubPackageJson();

  // Stub out methods
  tool.debug = mockDebugger();

  // TODO Remove in 2.0
  // @ts-ignore
  tool.createDebugger = mockDebugger;

  // @ts-ignore Allow private access to avoid loaders
  tool.initialized = true;

  return tool;
}
github milesj / boost / packages / core / src / testUtils.ts View on Github external
export function mockRoutine = TestTool>(
  tool: T,
  key: string = 'key',
  title: string = 'Title',
): Routine {
  const routine = new MockRoutine(key, title);

  routine.tool = tool;
  routine.debug = mockDebugger();

  return routine;
}

@boost/debug

Lightweight debugging and crash reporting.

MIT
Latest version published 2 months ago

Package Health Score

73 / 100
Full package analysis