Closed DaveMBush closed 5 months ago
Consider using the following code to run in silent mode.
const {config} = require('@memlab/core');
config.muteConsole = true;
We can also add an additional option for the run
API.
I just tried the above and I'm still seeing console output.
@DaveMBush can you share the code you use?
For example running node test.js
shows no output on my machine:
// save as test.js
const {run} = require('@memlab/api');
const {config} = require('@memlab/core');
config.muteConsole = true;
(async function () {
const scenario = {
url: () => 'https://www.facebook.com',
};
const {leaks} = await run({scenario});
})();
test.js
is located inside a npm project where it has run npm i memlab
.
Thanks. I found it. I was using config.isContinuousTest = true;
as well and that seems to override config.muteConsole
Thanks again for your help.
The CLI has a --silent option.
when running using script mode:
Is there a way to do the same?
I've tried
But it had no effect.