Personal Telegram developer console for GitHub
test: align status endpoint with live ops view
davoodmehraban89 committed
Oct 4, 2026 at 14:08 UTC
e4a6ee02e56f39939745543c330d69f7c7e6ac2d
1 file changed
+9
-4
test/index.test.js
+9
-4
@@ -41,13 +41,18 @@ describe('Nexa Dev Bot - Cloudflare Worker Entrypoint', () => {
41
assert.equal('uptime' in body, false);
42
});
43
44
- it('GET /status returns service status payload', async () => {
45
- const res = await worker.fetch(new Request('https://example.test/status', { method: 'GET' }), runtime);
44
+ it('GET /status returns the operational status payload without requiring an external network call', async () => {
45
+ const res = await worker.fetch(new Request('https://example.test/status', { method: 'GET' }), {
46
+ ...runtime,
47
+ GITHUB_TOKEN: ''
48
+ });
49
assert.equal(res.status, 200);
50
const body = await res.json();
48
- assert.ok(body.text.includes('وضعیت سیستم و سرویس'));
51
+ assert.ok(body.text.includes('وضعیت زنده Nexa Dev'));
52
+ assert.ok(body.text.includes('GitHub live READ'));
53
+ assert.ok(body.text.includes('WORKSPACE_STORE'));
54
assert.ok(body.reply_markup);
50
- assert.doesNotMatch(body.text, /100% SLA/i);
55
+ assert.doesNotMatch(body.text, /100% SLA|ms latency/i);
56
});
57
58
it('authorized Telegram webhook processes /start', async () => {