fix(core): update
This commit is contained in:
3
test/test.asynclocalstorage.ts
Normal file
3
test/test.asynclocalstorage.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
tap.test('demotask', async () => {});
|
||||
tap.start();
|
@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user