mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-28 16:31:56 +00:00
- Fix `SyntaxError: The requested module './lock-utils.mjs' does not provide an export named 'withTimeout'` by refactoring exports in `src/lock-utils.mjs`. - Explicitly import `relayListLabel` and `mergeRelayList` from `src/utils.mjs` before exporting them to avoid ambiguous export behavior in some environments. Co-authored-by: PR0M3TH3AN <[email protected]>
15 lines
472 B
JavaScript
15 lines
472 B
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert';
|
|
import fs from 'node:fs';
|
|
import path from 'node:path';
|
|
|
|
test('torch-config.example.json Security', () => {
|
|
const configPath = path.resolve('torch-config.example.json');
|
|
const content = fs.readFileSync(configPath, 'utf8');
|
|
const config = JSON.parse(content);
|
|
|
|
if (config.dashboard) {
|
|
assert.strictEqual(config.dashboard.auth, undefined, 'Example config should not contain auth field');
|
|
}
|
|
});
|