diff --git a/test/custom.mjs b/test/custom.mjs index a5eece7..d232dd5 100644 --- a/test/custom.mjs +++ b/test/custom.mjs @@ -136,5 +136,10 @@ describe('A custom instance', () => { // sake of catching new specializations). Not sure whether that will be // OK or a problem that will have to be dealt with. assert.strictEqual(inst.typeMerge(3, 3n), 'Merge to Complex') + // But types that truly cannot be merged should throw a TypeError + // Should add a variation of this with a more usual type once there is + // one not interconvertible with others... + inst.install(genericSubtract) + assert.throws(() => inst.typeMerge(3, undefined), TypeError) }) })