import test from 'node:test'; import assert from 'node:assert/strict'; import { readFileSync } from 'node:fs'; const source = readFileSync(new URL('../src/apps/inventory-sync.mjs', import.meta.url), 'utf8'); test('inventory refresh error logging cannot reference block-scoped trading config', () => { assert.match(source, /let activePair = null;/); assert.match(source, /activePair = tradingConfig\.activePair;/); assert.match(source, /pair: activePair/); assert.doesNotMatch(source, /pair: tradingConfig\.activePair/); });