fix continuity clean-room install verification
This commit is contained in:
@@ -52,6 +52,19 @@ test('normalizes missing fields from defaults', () => {
|
||||
assert.equal(normalized.receiptDir, defaultConfig.receiptDir);
|
||||
assert.deepEqual(normalized.legalTerminalStates, defaultConfig.legalTerminalStates);
|
||||
assert.notEqual(normalized.legalTerminalStates, defaultConfig.legalTerminalStates);
|
||||
assert.equal(normalized.adapter.genericPreflight.enabled, true);
|
||||
});
|
||||
|
||||
test('normalizes generic preflight adapter block label', () => {
|
||||
const normalized = normalizeContinuityConfig({
|
||||
adapter: {
|
||||
genericPreflight: {
|
||||
injectBlockLabel: ' CUSTOM_GENERIC_GATE ',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
assert.equal(normalized.adapter.genericPreflight.injectBlockLabel, 'CUSTOM_GENERIC_GATE');
|
||||
});
|
||||
|
||||
test('rejects non-array legalTerminalStates', () => {
|
||||
@@ -94,6 +107,17 @@ test('rejects malformed adapter.forceRecall shape', () => {
|
||||
assert.match(result.errors.join('\n'), /adapter\.forceRecall/);
|
||||
});
|
||||
|
||||
test('rejects malformed adapter.genericPreflight shape', () => {
|
||||
const result = validateContinuityConfig({
|
||||
adapter: {
|
||||
genericPreflight: false,
|
||||
},
|
||||
});
|
||||
|
||||
assert.equal(result.ok, false);
|
||||
assert.match(result.errors.join('\n'), /adapter\.genericPreflight/);
|
||||
});
|
||||
|
||||
test('rejects malformed adapter.forceRecall.enabled type', () => {
|
||||
const result = validateContinuityConfig({
|
||||
adapter: {
|
||||
@@ -120,6 +144,32 @@ test('rejects malformed adapter.forceRecall.injectBlockLabel type', () => {
|
||||
assert.match(result.errors.join('\n'), /injectBlockLabel/);
|
||||
});
|
||||
|
||||
test('rejects malformed adapter.genericPreflight.enabled type', () => {
|
||||
const result = validateContinuityConfig({
|
||||
adapter: {
|
||||
genericPreflight: {
|
||||
enabled: 'yes',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
assert.equal(result.ok, false);
|
||||
assert.match(result.errors.join('\n'), /adapter\.genericPreflight\.enabled/);
|
||||
});
|
||||
|
||||
test('rejects malformed adapter.genericPreflight.injectBlockLabel type', () => {
|
||||
const result = validateContinuityConfig({
|
||||
adapter: {
|
||||
genericPreflight: {
|
||||
injectBlockLabel: 42,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
assert.equal(result.ok, false);
|
||||
assert.match(result.errors.join('\n'), /adapter\.genericPreflight\.injectBlockLabel/);
|
||||
});
|
||||
|
||||
test('rejects unknown top-level key', () => {
|
||||
const result = validateContinuityConfig({
|
||||
unexpected: true,
|
||||
|
||||
Reference in New Issue
Block a user