fix(core): update

This commit is contained in:
2021-09-17 19:21:34 +02:00
parent 185baac511
commit 80b0bdd663
10 changed files with 18882 additions and 2845 deletions

View File

@ -0,0 +1,3 @@
import { tap, expect } from '@pushrocks/tapbundle';
tap.test('demotask', async () => {});
tap.start();

View File

@ -4,7 +4,7 @@ import * as logcontext from '../ts/index';
let testLogger = new logcontext.Logger('testNamespace');
tap.test('should log for .error()', async () => {
testLogger.error(new Error('first error message'));
testLogger.error('first error message');
});
tap.test('should log for .fatal()', async () => {
@ -14,12 +14,12 @@ tap.test('should log for .fatal()', async () => {
// set up independent log context
tap.testParallel('should create an async LogContext', async (tools) => {
testLogger.scope(async () => {
testLogger.logmap.addData('id1', {
testLogger.logmap.addData('paramName1', {
someData: 'someValue',
});
await tools.delayFor(10).then(async () => {
testLogger.log('hi');
testLogger.error(new Error('custom error message'));
testLogger.error('custom error message');
});
});
});