mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
- Fix lint error in `test/verify-example-config-security.test.mjs` (unused var). - Fix duplicate definitions of `mergeRelayList` and `relayListLabel` in `src/lock-ops.mjs` and `src/lock-publisher.mjs`. - Fix missing export of `withTimeout` in `src/lock-utils.mjs`. - Fix broken imports in `test/utils.test.mjs` and `test/utils-async.test.mjs`. - Centralize `secureRandom` in `src/lock-utils.mjs`. 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');
|
|
}
|
|
});
|