34 lines
884 B
JavaScript
34 lines
884 B
JavaScript
/**
|
|
* GATE 2 (partial) — config exports.
|
|
*/
|
|
|
|
import { describe, it } from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { config, PLAN_LIMITS } from '../../src/config.js';
|
|
|
|
describe('config', () => {
|
|
it('exposes required keys for HTTP and NATS', () => {
|
|
for (const key of [
|
|
'port',
|
|
'host',
|
|
'veraeApiBaseUrl',
|
|
'mockVerae',
|
|
'natsEnabled',
|
|
'natsUrl',
|
|
'tokenSecret',
|
|
'jobPollIntervalMs',
|
|
'jobPollMaxAttempts',
|
|
'waitTimeoutMs',
|
|
'storePath',
|
|
]) {
|
|
assert.notEqual(config[key], undefined, `missing config.${key}`);
|
|
}
|
|
});
|
|
|
|
it('defines plan limits for free through enterprise', () => {
|
|
for (const plan of ['free', 'starter', 'pro', 'enterprise']) {
|
|
assert.ok(PLAN_LIMITS[plan], plan);
|
|
assert.equal(typeof PLAN_LIMITS[plan].requestsPerMinute, 'number');
|
|
}
|
|
});
|
|
});
|