mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-10-09 15:58:34 +00:00
18 lines
793 B
TypeScript
18 lines
793 B
TypeScript
import assert from 'node:assert/strict';
|
|
import { readFileSync } from 'node:fs';
|
|
import test from 'node:test';
|
|
|
|
const source = readFileSync(new URL('./HostDetailsPanel.tsx', import.meta.url), 'utf8');
|
|
|
|
test('SSH agent availability ignores stale async responses', () => {
|
|
assert.match(source, /let cancelled = false/);
|
|
assert.match(source, /if \(!cancelled\) setSshAgentStatus\(status\)/);
|
|
assert.match(source, /return \(\) => \{\s*cancelled = true/);
|
|
});
|
|
|
|
test('inherited identity actions use the resolved authentication username', () => {
|
|
assert.match(source, /const effectiveAuth = useMemo\(\(\) => resolveHostAuth/);
|
|
assert.match(source, /detachEffectiveHostIdentity\(prev, effectiveAuth\.username\)/);
|
|
assert.match(source, /effectiveUsername=\{effectiveAuth\.username\}/);
|
|
});
|