You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert.strictEqual(awaitisMalformedAnswerOption(client,questionId,canonicalScalarAnswer),false,'canonical scalar answer should remain valid')
333
+
assert.notStrictEqual(canonicalScalarLabel,'Malformed','canonical scalar answer should keep a non-malformed label')
334
+
assert.strictEqual(awaitisMalformedAnswerOption(client,questionId,aliasedScalarAnswer),true,'scalar alias with reserved bits should be malformed')
335
+
assert.strictEqual(awaitgetAnswerOptionName(client,questionId,aliasedScalarAnswer),'Malformed','scalar alias with reserved bits should render as malformed')
336
+
assert.strictEqual(awaitisMalformedAnswerOption(client,questionId,aliasedInvalidAnswer),true,'invalid alias with reserved bits should be malformed')
337
+
assert.strictEqual(awaitgetAnswerOptionName(client,questionId,aliasedInvalidAnswer),'Malformed','invalid alias with reserved bits should render as malformed')
338
+
assert.strictEqual(awaitgetAnswerOptionName(client,questionId,canonicalInvalidAnswer),'Invalid','canonical invalid answer should remain available')
339
+
})
340
+
307
341
test('accepts scalar questions at the uint120 encoding boundary',async()=>{
assert.ok(aliasedChildUniverseId!==getChildUniverseId(genesisUniverse,canonicalScalarOutcomeIndex),'reserved-bit alias should still hash to a distinct child id before validation')
expect(()=>formatScalarOutcomeIndexLabel(scalarQuestion,aliasedOutcomeIndex)).toThrow('Scalar outcome index is malformed')
70
+
})
71
+
56
72
voidtest('rejects scalar inputs that do not divide into whole ticks',()=>{
57
73
expect(()=>parseScalarFormInputs({scalarMin: '1',scalarMax: '10',scalarIncrement: '0.4'})).toThrow('Scalar min, max, and increment do not produce a whole number of ticks')
0 commit comments