How to use the egg-mock.cluster 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 midwayjs / midway / packages / midway-mock / src / mock.ts View on Github external
mm.cluster = (options) => {
  if (process.env.MIDWAY_BASE_DIR && !options.baseDir) { options.baseDir = process.env.MIDWAY_BASE_DIR; }
  if (process.env.MIDWAY_FRAMEWORK_PATH && !options.framework) { options.framework = process.env.MIDWAY_FRAMEWORK_PATH; }
  // @ts-ignore
  return mock.cluster(Object.assign({
    framework: options.framework || defaultFramework,
    typescript: !!require.extensions['.ts'],
  }, options));
};
github eggjs / egg / test / utils.js View on Github external
exports.cluster = (name, options) => {
  options = formatOptions(name, options);
  return mm.cluster(options);
};

egg-mock

mock server for egg

MIT
Latest version published 4 months ago

Package Health Score

67 / 100
Full package analysis

Similar packages