Initial import of verae-middleware from zapier monorepo

This commit is contained in:
George Lambert 2026-09-11 13:31:59 -04:00
commit 72e143a8e5
66 changed files with 6590 additions and 0 deletions

34
test/unit/config.test.js Normal file
View file

@ -0,0 +1,34 @@
/**
* 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');
}
});
});