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

@bitdiver/logadapter-dispatcher

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitdiver/logadapter-dispatcher - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

14

package.json
{
"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 = []

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