fix(core): Enhanced debugging and improved dependency tracking

This commit is contained in:
2025-01-23 20:06:18 +01:00
parent 57d1dc3fe0
commit 6a373a93b3
7 changed files with 101 additions and 84 deletions

View File

@@ -1,15 +1,18 @@
import { tap, expect } from '@push.rocks/tapbundle';
import { AsyncContext } from '../ts/logcontext.classes.asynccontext.js';
import { AsyncStore } from '../ts/logcontext.classes.asyncstore.js';
process.env.DEBUG = 'true';
import * as asynccontext from '../ts/index.js';
if (typeof process !== 'undefined') {
process.env.DEBUG = 'true';
}
/**
* This test file demonstrates how to use the AsyncContext and ensures
* that runScoped() properly creates child AsyncStore contexts and merges parent data.
*/
const asyncContext = new AsyncContext();
const asyncContext = new asynccontext.AsyncContext();
tap.test('should run a scoped function and add data to a child store', async () => {
// add some default data to the parent store