How to use the egg-mock.consoleLevel function in egg-mock

To help you get started, we’ve selected a few egg-mock examples, based on popular ways it is used in public projects.

github alibaba / beidou / examples / benchmark / benchmark.js View on Github external
'use strict';

const Benchmark = require('benchmark');
const mm = require('egg-mock');
const table = require('markdown-table');

mm.consoleLevel('NONE');
// Benchmark.options.minSamples = 100;
let app = null;

const startApp = async () => {
  process.env.NODE_ENV = 'production';
  mm.env('prod');
  app = mm.app({
    baseDir: __dirname,
    framework: 'beidou',
  });
  await app.ready();
  await app.httpRequest().get('/');
};

const stopApp = () => app && app.close();

egg-mock

mock server for egg

MIT
Latest version published 4 months ago

Package Health Score

67 / 100
Full package analysis

Similar packages