How to use the test-console.stdout.ignore function in test-console

To help you get started, we’ve selected a few test-console 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 chiefy / metalsmith-express / test / test_server.js View on Github external
before(function startServer() {
      //  The server itself is not externally accessible;
      //  this function just returns a plain object containing
      //  `start()` and `stop()` controls.
      let suppressOutput = stdout.ignore()
      serverController = metalsmithExpressServer({'document_root': '.'})
      serverController.start( suppressOutput )
    })
    after(function stopServer() {
github DefinitelyTyped / DefinitelyTyped / types / test-console / test-console-tests.ts View on Github external
// $ExpectType Inspector
stdout.inspect();
// $ExpectType Inspector
stdout.inspect({isTTY: true});

// $ExpectError
stdout.inspectSync();
// $ExpectError
stdout.inspectSync({});
// $ExpectType ReadonlyArray || Output
stdout.inspectSync({isTTY: false}, (output) => output);

// $ExpectType Restore
stdout.ignore();
// $ExpectType Restore
stdout.ignore({isTTY: false});

// $ExpectError
stdout.ignoreSync();
// $ExpectType void
stdout.ignoreSync(() => {});
// $ExpectError
stdout.ignoreSync({}, (output) => output);
// $ExpectType void
stdout.ignoreSync({}, () => {});

// $ExpectType Inspector
stderr.inspect();
// $ExpectType Inspector
stderr.inspect({isTTY: true});

// $ExpectError
github chiefy / metalsmith-express / test / test_server.js View on Github external
after(function stopServer() {
      let suppressOutput = stdout.ignore()
      serverController.stop( suppressOutput )
    })