Files
BetterDesk/web-nodejs/tests/localClientBuilder.test.js
T
UNITRONIX d57fe3dc49 feat(generator): add generic agent releases and QR activation
Adds local verification and distribution of signed generic incoming-only agent releases, mobile-friendly QR activation, and the supporting generator interfaces. Includes the current staged console, documentation, localization, and builder changes.\n\nThanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-10-11 00:43:26 +02:00

34 lines
1.2 KiB
JavaScript

'use strict';
const builder = require('../services/localClientBuilder');
describe('localClientBuilder capability probe', () => {
test('maps supported host architectures to provider architecture names', () => {
expect(builder.providerArch('x64')).toBe('x86_64');
expect(builder.providerArch('arm64')).toBe('aarch64');
});
test('never throws when probing the current host toolchain', () => {
const capabilities = builder.getCapabilities();
expect(capabilities).toMatchObject({
mode: 'local',
host: {
platform: expect.stringMatching(/^(linux|windows|macos)$/),
arch: expect.stringMatching(/^(x64|arm64)$/),
},
toolchain: {
ready: expect.any(Boolean),
missing: expect.any(Array),
},
targets: expect.any(Array),
});
if (capabilities.toolchain.ready) {
expect(capabilities.targets.length).toBeGreaterThan(0);
expect(capabilities.targets.every((target) => (
target.platform === capabilities.host.platform
&& target.arch === capabilities.host.arch
))).toBe(true);
}
});
});