openvibers/openvibe.sources Commits
The registry keeps an api endpoint's duplicates setting; a seed test checks no endpoint field is dropped (BLS kept every series' 1995 price) (#99)
Changes
@@@ -81,6 +81,7 @@ function validateSource(input, { maxItemsCap = 12000 } = {}) {if (e.where) out.where = e.where;// and `extra_lists` (tags, job types) the same way.if (e.extra_lists) out.extra_lists = e.extra_lists;++ if (e.duplicates !== undefined) out.duplicates = e.duplicates;if (e.max_bytes !== undefined) out.max_bytes = e.max_bytes;if (e.timeout_ms !== undefined) out.timeout_ms = e.timeout_ms;if (e.request_content_type !== undefined) out.request_content_type = e.request_content_type;@@@ -30,6 +30,17 @@ t('every seed validates, is disabled, and keys only https endpoints', () => {}});++t('the registry keeps every endpoint field a seed sets (it dropped duplicates: last, 2026-10-24)', () => {++ // bls-average-prices was created without "duplicates": "last", so every BLS series kept its 1995 price.++ for (const s of seeds) {++ const rec = validateSource(s);++ (s.endpoints || []).forEach((ep, i) => {++ if (!ep || typeof ep !== 'object') return;++ for (const k of Object.keys(ep)) assert.deepStrictEqual(rec.endpoints[i][k], ep[k], `${s.key} endpoints[${i}].${k} was dropped or changed by the registry`);++ });++ }++});++t('every seed creates through the registry and stays disabled', async () => {const fresh = await require('./db').testDb();try {
@@ -81,6 +81,7 @@ function validateSource(input, { maxItemsCap = 12000 } = {}) {
@@ -81,6 +81,7 @@ function validateSource(input, { maxItemsCap = 12000 } = {}) {
if (e.where) out.where = e.where;
if (e.where) out.where = e.where;
// and `extra_lists` (tags, job types) the same way.
// and `extra_lists` (tags, job types) the same way.
if (e.extra_lists) out.extra_lists = e.extra_lists;
if (e.extra_lists) out.extra_lists = e.extra_lists;
+ if (e.duplicates !== undefined) out.duplicates = e.duplicates;
if (e.max_bytes !== undefined) out.max_bytes = e.max_bytes;
if (e.max_bytes !== undefined) out.max_bytes = e.max_bytes;
if (e.timeout_ms !== undefined) out.timeout_ms = e.timeout_ms;
if (e.timeout_ms !== undefined) out.timeout_ms = e.timeout_ms;
if (e.request_content_type !== undefined) out.request_content_type = e.request_content_type;
if (e.request_content_type !== undefined) out.request_content_type = e.request_content_type;
@@ -30,6 +30,17 @@ t('every seed validates, is disabled, and keys only https endpoints', () => {
@@ -30,6 +30,17 @@ t('every seed validates, is disabled, and keys only https endpoints', () => {
}
}
});
});
+t('the registry keeps every endpoint field a seed sets (it dropped duplicates: last, 2026-10-24)', () => {
+ // bls-average-prices was created without "duplicates": "last", so every BLS series kept its 1995 price.
+ for (const s of seeds) {
+ const rec = validateSource(s);
+ (s.endpoints || []).forEach((ep, i) => {
+ if (!ep || typeof ep !== 'object') return;
+ for (const k of Object.keys(ep)) assert.deepStrictEqual(rec.endpoints[i][k], ep[k], `${s.key} endpoints[${i}].${k} was dropped or changed by the registry`);
+ });
+ }
+});
+
t('every seed creates through the registry and stays disabled', async () => {
t('every seed creates through the registry and stays disabled', async () => {
const fresh = await require('./db').testDb();
const fresh = await require('./db').testDb();
try {
try {