Initial import of verae-middleware from zapier monorepo
This commit is contained in:
commit
3390a9a8c0
67 changed files with 6630 additions and 0 deletions
34
test/unit/config.test.js
Normal file
34
test/unit/config.test.js
Normal 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');
|
||||
}
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue