Skip to content

Repository files, collaboration, releases and project activity.

archforge-external-status / tests/branding.test.jsmain
▤ tests/branding.test.js890 bytes
15 lines · Select a line number for a permalink
1'use strict';
2const {test}=require('node:test');const assert=require('node:assert/strict');
3const {serviceDefinitions}=require('../src/probes');
4const {adminDashboard}=require('../src/views');
5test('Service names and category use ArchForge branding with stable IDs',()=>{
6 const services=serviceDefinitions({api:'',gitHttp:''});
7 const http=services.find(s=>s.id==='git_http');const ssh=services.find(s=>s.id==='git_ssh');
8 assert.equal(http.label,'ArchForge HTTPS');assert.equal(ssh.label,'ArchForge SSH');
9 assert.equal(http.category,'ArchForge');assert.equal(ssh.category,'ArchForge');
10});
11test('Admin HTML shows renamed service labels',()=>{
12 const source=adminDashboard({csrf:'safe-token',services:[{id:'git_ssh',label:'ArchForge SSH',current_state:'operational'}],incidents:[],maintenance:[],queue:0});
13 assert.match(source,/ArchForge SSH/);assert.doesNotMatch(source,/\bGit\b/);
14});