test: register test for CleanEmailService

This commit is contained in:
KernelDeimos 2024-10-02 21:30:14 -04:00
parent 054b9c2864
commit 2c3065a70f
2 changed files with 18 additions and 0 deletions

View File

@ -243,6 +243,9 @@ const install = async ({ services, app, useapi }) => {
const { EdgeRateLimitService } = require('./services/abuse-prevention/EdgeRateLimitService');
services.registerService('edge-rate-limit', EdgeRateLimitService);
const { CleanEmailService } = require('./services/CleanEmailService');
services.registerService('clean-email', CleanEmailService);
const { Emailservice } = require('./services/EmailService');
services.registerService('email', Emailservice);

View File

@ -157,6 +157,21 @@ for ( const name in k.services.instances_ ) {
}
};
testapi.assert.equal = (a, b, name) => {
name = name || `${a} === ${b}`;
if ( a === b ) {
passed++;
repeat_after(() => console.log(`\x1B[32;1m ✔ ${name}\x1B[0m`));
} else {
failed++;
repeat_after(() => {
console.log(`\x1B[31;1m ✘ ${name}\x1B[0m`);
console.log(`\x1B[31;1m Expected: ${b}\x1B[0m`);
console.log(`\x1B[31;1m Got: ${a}\x1B[0m`);
});
}
};
ins._test(testapi);
total_passed += passed;