@bitdiver/logadapter
Advanced tools
Comparing version 1.0.8 to 1.0.9
{ | ||
"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() | ||
}) |
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
48610
1327
+ Added@babel/runtime@7.3.4(transitive)
- Removed@babel/runtime@7.3.1(transitive)
Updated@babel/runtime@7.3.4