Files
HexaHost-GameCloud/apps/api/test/phase9.test.js
smueller ed8334328e
Some checks failed
CI / Node — lint, typecheck, test, build (push) Failing after 9s
CI / Go — node-agent tests (push) Failing after 8s
CI / Go — edge-gateway build (push) Successful in 17s
Phase9
2026-06-26 13:46:25 +02:00

30 lines
1.0 KiB
JavaScript

import { describe, it } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
describe('phase 9 api contract', () => {
it('documents WHMCS integration routes and billing suspension', () => {
const whmcsSource = readFileSync(
join(process.cwd(), 'src', 'integrations/whmcs/whmcs-integration.controller.ts'),
'utf8',
);
assert.ok(whmcsSource.includes("'integrations/whmcs'"));
assert.ok(whmcsSource.includes("'services/:externalServiceId/suspend'"));
assert.ok(whmcsSource.includes('WhmcsIntegrationGuard'));
const billingSource = readFileSync(
join(process.cwd(), 'src', 'billing/billing.service.ts'),
'utf8',
);
assert.ok(billingSource.includes('isWhmcsBilling'));
const serversSource = readFileSync(
join(process.cwd(), 'src', 'servers/servers.service.ts'),
'utf8',
);
assert.ok(serversSource.includes('assertServerNotBillingSuspended'));
assert.ok(serversSource.includes('billingSuspendedAt'));
});
});