Socket
Socket
Sign inDemoInstall

egg-mock

Package Overview
Dependencies
372
Maintainers
12
Versions
125
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.2 to 5.1.0

History.md

12

bootstrap.js

@@ -6,5 +6,6 @@ 'use strict';

const mock = require('./index').default;
const mockParallelApp = require('./lib/parallel/app');
const { getEggOptions } = require('./lib/utils');
const options = {};
if (process.env.EGG_BASE_DIR) options.baseDir = process.env.EGG_BASE_DIR;
const options = getEggOptions();

@@ -15,3 +16,8 @@ // throw error when an egg plugin test is using bootstrap

const app = mock.app(options);
let app;
if (process.env.ENABLE_MOCHA_PARALLEL && process.env.AUTO_AGENT) {
app = mockParallelApp(options);
} else {
app = mock.app(options);
}

@@ -18,0 +24,0 @@ if (typeof beforeAll === 'function') {

const util = require('util');
const { rm } = require('fs/promises');
const { rmSync } = require('fs');
const is = require('is-type-of');

@@ -19,2 +20,20 @@ const setTimeoutPromise = util.promisify(setTimeout);

},
getProperty(target, prop) {
const member = target[prop];
if (is.function(member)) {
return member.bind(target);
}
return member;
},
getEggOptions() {
const options = {};
if (process.env.EGG_BASE_DIR) {
options.baseDir = process.env.EGG_BASE_DIR;
} else {
options.baseDir = process.cwd();
}
return options;
},
};
{
"name": "egg-mock",
"version": "5.0.2",
"version": "5.1.0",
"eggPlugin": {

@@ -44,2 +44,3 @@ "name": "egg-mock"

"power-assert": "^1.6.1",
"sdk-base": "^3.0.1",
"supertest": "^6.2.4",

@@ -60,3 +61,2 @@ "urllib-next": "^3.2.3"

"pedding": "^1.1.0",
"sdk-base": "^3.0.1",
"tsd": "^0.24.1"

@@ -63,0 +63,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc