@bitdiver/logadapter-dispatcher
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "@bitdiver/logadapter-dispatcher", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "", | ||
@@ -39,8 +39,8 @@ "main": "lib/index.js", | ||
"@babel/cli": "7.2.3", | ||
"@babel/core": "7.3.3", | ||
"@babel/core": "7.3.4", | ||
"@babel/node": "7.2.2", | ||
"@babel/plugin-proposal-object-rest-spread": "7.3.2", | ||
"@babel/plugin-transform-runtime": "7.2.0", | ||
"@babel/plugin-proposal-object-rest-spread": "7.3.4", | ||
"@babel/plugin-transform-runtime": "7.3.4", | ||
"@babel/polyfill": "7.2.5", | ||
"@babel/preset-env": "7.3.1", | ||
"@babel/preset-env": "7.3.4", | ||
"@babel/register": "7.0.0", | ||
@@ -52,3 +52,3 @@ "babel-core": "7.0.0-bridge.0", | ||
"eslint": "5.14.1", | ||
"eslint-config-prettier": "4.0.0", | ||
"eslint-config-prettier": "4.1.0", | ||
"eslint-plugin-babel": "5.3.0", | ||
@@ -64,4 +64,4 @@ "jest": "24.1.0", | ||
"dependencies": { | ||
"@babel/runtime": "7.3.1" | ||
"@babel/runtime": "7.3.4" | ||
} | ||
} |
@@ -13,2 +13,29 @@ import { LogAdapterDispatcher, getLogAdapter } from '../lib/index' | ||
*/ | ||
test('Logadapter set loglevel', async done => { | ||
const logger1 = new DemoAdapter({ name: 'logger1' }) | ||
const logger2 = new DemoAdapter({ name: 'logger2' }) | ||
const logAdapter = new LogAdapterDispatcher({ | ||
logAdapterList: [logger1, logger2], | ||
}) | ||
logAdapter.level = 3 | ||
expect(logAdapter.level).toEqual(3) | ||
expect(logAdapter.levelNumber).toEqual(3) | ||
expect(logger1.level).toEqual(3) | ||
expect(logger2.level).toEqual(3) | ||
logAdapter.level = 1 | ||
expect(logAdapter.level).toEqual(1) | ||
expect(logAdapter.levelNumber).toEqual(1) | ||
expect(logger1.level).toEqual(1) | ||
expect(logger2.level).toEqual(1) | ||
done() | ||
}) | ||
/* | ||
* Test that the reset will be executed for all the logger | ||
*/ | ||
test('Logadapter reset', async done => { | ||
@@ -74,2 +101,3 @@ const logger1 = new DemoAdapter({ name: 'logger1' }) | ||
this.messages = [] | ||
this.level = 0 | ||
} | ||
@@ -82,2 +110,8 @@ async log(logMessage) { | ||
} | ||
// dummy implementation. | ||
get levelNumber() { | ||
return this.level | ||
} | ||
reset() { | ||
@@ -84,0 +118,0 @@ this.messages = [] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12682
186
+ Added@babel/runtime@7.3.4(transitive)
- Removed@babel/runtime@7.3.1(transitive)
Updated@babel/runtime@7.3.4