Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

egg-mock

Package Overview
Dependencies
Maintainers
5
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-mock - npm Package Compare versions

Comparing version 3.15.1 to 3.16.0

app/.DS_Store

9

app/extend/application.js

@@ -62,3 +62,10 @@ 'use strict';

}
mm(this.context, 'session', Object.assign({ save() {} }, data));
if (is.object(data) && !data.save) {
Object.defineProperty(data, 'save', {
value: () => {},
enumerable: false,
});
}
mm(this.context, 'session', data);
return this;

@@ -65,0 +72,0 @@ },

@@ -8,2 +8,3 @@ 'use strict';

if (process.env.EGG_BASE_DIR) options.baseDir = process.env.EGG_BASE_DIR;
if (process.env.EGG_TYPESCRIPT) options.typescript = process.env.EGG_TYPESCRIPT;
const app = mock.app(options);

@@ -10,0 +11,0 @@

3.16.0 / 2018-03-28
===================
* feat: support ts (#70)
* fix: mockSession save should not be enumerable (#69)
3.15.1 / 2018-03-20

@@ -3,0 +9,0 @@ ==================

@@ -85,2 +85,7 @@ import { Application, Context } from 'egg';

clean?: boolean;
/**
* Enable typescript support
*/
typescript?: boolean;
}

@@ -87,0 +92,0 @@

@@ -54,2 +54,3 @@ 'use strict';

* - {String} framework - The directory of the egg framework
* - {Boolean} [typescript] - Enable TypeScript support
* - {Boolean} [cache=true] - Cache application based on baseDir

@@ -56,0 +57,0 @@ * - {Boolean} [coverage=true] - Swtich on process coverage, but it'll be slower

2

package.json
{
"name": "egg-mock",
"version": "3.15.1",
"version": "3.16.0",
"eggPlugin": {

@@ -5,0 +5,0 @@ "name": "egg-mock"

@@ -188,3 +188,3 @@ # egg-mock

Environment list https://github.com/eggjs/egg-core/blob/master/lib/loader/egg_loader.js#L82
Environment list <https://github.com/eggjs/egg-core/blob/master/lib/loader/egg_loader.js#L82>

@@ -196,3 +196,3 @@ ### mm.consoleLevel(level)

```js
// 不输出到终端
// DON'T log to terminal
mm.consoleLevel('NONE');

@@ -270,2 +270,8 @@ ```

#### typescript {Boolean}
Enable Typescript support, default is false.
Support read from `process.env.EGG_TYPESCRIPT`.
### app.httpRequest()

@@ -347,3 +353,2 @@

### app.mockService(service, methodName, fn)

@@ -356,3 +361,3 @@

});
const ctx = app.mockContext();
const ctx = app.mockContext();
yield ctx.service.user.getName();

@@ -370,3 +375,3 @@ });

### app.mockCsrf();
### app.mockCsrf()

@@ -373,0 +378,0 @@ ```js

@@ -193,3 +193,3 @@ # egg-mock

具体值见 https://github.com/eggjs/egg-core/blob/master/lib/loader/egg_loader.js#L82
具体值见 <https://github.com/eggjs/egg-core/blob/master/lib/loader/egg_loader.js#L82>

@@ -207,3 +207,2 @@ ### mm.consoleLevel(level)

### mm.home(homePath)

@@ -281,2 +280,8 @@

#### typescript {Boolean}
开启 TypeScript 支持,默认关闭。
支持读取环境变量 `process.env.EGG_TYPESCRIPT`。
### app.httpRequest()

@@ -367,3 +372,3 @@

});
const ctx = app.mockContext();
const ctx = app.mockContext();
yield ctx.service.user.getName();

@@ -381,3 +386,3 @@ });

### app.mockCsrf();
### app.mockCsrf()

@@ -384,0 +389,0 @@ 模拟 csrf,不用传递 token

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc