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

@bitdiver/logadapter

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitdiver/logadapter - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

14

package.json
{
"name": "@bitdiver/logadapter",
"version": "1.0.8",
"version": "1.0.9",
"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",

@@ -65,3 +65,3 @@ "globby": "9.0.0",

"dependencies": {
"@babel/runtime": "7.3.1",
"@babel/runtime": "7.3.4",
"mkdirp": "0.5.1",

@@ -68,0 +68,0 @@ "moment": "2.24.0"

@@ -299,1 +299,136 @@ import { LogAdapterMemory } from '../lib/index'

})
test('Test reset and log step', async done => {
const logAdapter = new LogAdapterMemory({ logLevel: 2 })
// this is a run message
const logMessage = {
meta: {
run: {
start: 1533720241284,
id: '0815',
},
tc: {
id: 'gum',
name: 'my tc name',
countAll: 100,
countCurrent: 5,
},
step: { id: 'bo', name: 'my step name', countAll: 15, countCurrent: 3 },
},
data: {},
logLevel: 3,
}
await logAdapter.log(logMessage)
expect(logAdapter.logs).toEqual({
'0815': {
logs: [],
testcases: {
'my tc name': {
countAll: 100,
countCurrent: 5,
logs: [],
steps: {
'my step name': {
logs: [
{
countAll: 15,
countCurrent: 3,
data: {},
logLevel: 'error',
},
],
},
},
},
},
},
})
logAdapter.reset()
expect(logAdapter.logs).toEqual({})
done()
})
test('Test log run', async done => {
const logAdapter = new LogAdapterMemory({ logLevel: 2 })
// this is a run message
const logMessage = {
meta: {
run: {
start: 1533720241284,
id: '0815',
},
},
data: { gum: 'bo' },
logLevel: 3,
}
await logAdapter.log(logMessage)
expect(logAdapter.logs).toEqual({
'0815': {
logs: [{ data: { gum: 'bo' }, logLevel: 'error' }],
testcases: {},
},
})
logAdapter.reset()
expect(logAdapter.logs).toEqual({})
done()
})
test('Test log test case', async done => {
const logAdapter = new LogAdapterMemory({ logLevel: 2 })
// this is a run message
const logMessage = {
meta: {
run: {
start: 1533720241284,
id: '0815',
},
tc: {
id: 'gum',
name: 'my tc name',
countAll: 100,
countCurrent: 5,
},
},
data: { gum: 'bo' },
logLevel: 3,
}
await logAdapter.log(logMessage)
expect(logAdapter.logs).toEqual({
'0815': {
logs: [],
testcases: {
'my tc name': {
countAll: 100,
countCurrent: 5,
logs: [
{
countAll: 100,
countCurrent: 5,
data: { gum: 'bo' },
logLevel: 'error',
},
],
steps: {},
},
},
},
})
logAdapter.reset()
expect(logAdapter.logs).toEqual({})
done()
})
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