Wait-via-NATS returns completed or pending+jobId (GATE 9). Mock SHA256
idempotent register + GET /hashes/{sha256}. Zappier commercial edge has
POST /v1/timestamp and hash-lookup. GATE 12 smoke (signup + wait) passes.
NS1 NATS is 127.0.0.1:4222 on 70.88.205.138; SSH tunnel :14222. Local
nats-server -js used for isolated tests. Activate app adds Echo Text.
Learned: JetStream on NS1 is loopback-only; do not bind 4222 public.
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');
|
|
}
|
|
});
|
|
});
|