mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-31 18:01:55 +00:00
- Added test script and initial smoke tests - Generated daily audit report - Updated scheduler log Co-authored-by: PR0M3TH3AN <[email protected]>
18 lines
653 B
JavaScript
18 lines
653 B
JavaScript
import { test, describe, it } from 'node:test';
|
|
import assert from 'node:assert';
|
|
import { spawnSync } from 'node:child_process';
|
|
|
|
describe('CLI Smoke Test', () => {
|
|
it('should print usage when no args provided', () => {
|
|
const result = spawnSync('node', ['src/nostr-lock.mjs']);
|
|
assert.strictEqual(result.status, 1);
|
|
assert.match(result.stderr.toString(), /Usage:/);
|
|
});
|
|
|
|
it('should fail when checking without cadence', () => {
|
|
const result = spawnSync('node', ['src/nostr-lock.mjs', 'check']);
|
|
assert.strictEqual(result.status, 1);
|
|
assert.match(result.stderr.toString(), /--cadence <daily|weekly> is required/);
|
|
});
|
|
});
|