How to use the enable function from debug

Find comprehensive JavaScript debug.enable code examples handpicked from public code repositorys.

118
119
120
121
122
123
124
125
126
127
  expect(() => new App()).toThrow("must be initialized with a configuration");
});

describe("Testing mocked generator...", () => {
  it("should pass through in non-quiet mode (with DEBUG setting too)", async () => {
    debugInstance.enable("artifact-generator:*");

    const config = {
      _: ["generate"],
      inputResources: ["some_file.ttl"],
fork icon3
star icon8
watch icon12

2
3
4
5
6
7
8
9
10
11
12
const debugModule = require("debug");
const { processCommandLine, configureLog } = require("./commandLineProcessor");


describe("Command line argument handling", () => {
  it("should default to logging all", () => {
    debugModule.enable("artifact-generator:*");
    configureLog({});
    const previouslyEnabled = debugModule.disable();
    configureLog({});
    expect(previouslyEnabled).toContain("artifact-generator:*");
fork icon3
star icon7
watch icon0