Files
HexaHost-GameCloud/apps/api/test/phase7.test.js
smueller ab21f53cdd
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 14s
Phase7
2026-06-26 13:20:55 +02:00

29 lines
914 B
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 7 api contract', () => {
it('documents idle shutdown and billing routes', () => {
const billingSource = readFileSync(
join(process.cwd(), 'src', 'billing/billing.controller.ts'),
'utf8',
);
assert.ok(billingSource.includes("'wallet'"));
assert.ok(billingSource.includes("'usage'"));
const idleSource = readFileSync(
join(process.cwd(), 'src', 'servers/idle/idle.service.ts'),
'utf8',
);
assert.ok(idleSource.includes('getIdleStatus'));
assert.ok(idleSource.includes('extendIdleCountdown'));
const serversSource = readFileSync(
join(process.cwd(), 'src', 'servers/servers.controller.ts'),
'utf8',
);
assert.ok(serversSource.includes(':id/idle'));
});
});