From f34094555a04a1c5fa1ed9a88b46437db2a7a694 Mon Sep 17 00:00:00 2001 From: "Mark S. Miller" Date: Thu, 2 Jan 2025 11:13:53 -0800 Subject: [PATCH] fixup! comments --- packages/pass-style/test/passStyleOf.test.js | 33 ++++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/packages/pass-style/test/passStyleOf.test.js b/packages/pass-style/test/passStyleOf.test.js index eb627b910a..f8b292d978 100644 --- a/packages/pass-style/test/passStyleOf.test.js +++ b/packages/pass-style/test/passStyleOf.test.js @@ -197,13 +197,17 @@ test('passStyleOf testing remotables', t => { t.is(passStyleOf(farObj1), 'remotable'); const tagRecord2 = makeTagishRecord('Alleged: tagRecord not hardened'); - /** @type {any} UNTIL https://github.com/microsoft/TypeScript/issues/38385 */ - // TODO In order to run this test before we have explicit support for a - // non-trapping integrity level, we have to `freeze` here but not `harden`. - // However, once we do have that support, and `passStyleOf` checks that - // its argument is also non-trapping, we still need to avoid `harden` - // because that would also hardden `mercurialProto`. So we will need to - // explicitly make this non-trapping, which we cannot yet express. + /** + * TODO In order to run this test before we have explicit support for a + * non-trapping integrity level, we have to `freeze` here but not `harden`. + * However, once we do have that support, and `passStyleOf` checks that + * its argument is also non-trapping, we still need to avoid `harden` + * because that would also hardden `__proto__`. So we will need to + * explicitly make this non-trapping, which we cannot yet express. + * @see https://github.com/tc39/proposal-stabilize + * + * @type {any} UNTIL https://github.com/microsoft/TypeScript/issues/38385 + */ const farObj2 = freeze({ __proto__: tagRecord2 }); if (harden.isFake) { t.is(passStyleOf(farObj2), 'remotable'); @@ -373,12 +377,15 @@ test('remotables - safety from the gibson042 attack', t => { }, ); - // TODO In order to run this test before we have explicit support for a - // non-trapping integrity level, we have to `freeze` here but not `harden`. - // However, once we do have that support, and `passStyleOf` checks that - // its argument is also non-trapping, we still need to avoid `harden` - // because that would also hardden `mercurialProto`. So we will need to - // explicitly make this non-trapping, which we cannot yet express. + /** + * TODO In order to run this test before we have explicit support for a + * non-trapping integrity level, we have to `freeze` here but not `harden`. + * However, once we do have that support, and `passStyleOf` checks that + * its argument is also non-trapping, we still need to avoid `harden` + * because that would also hardden `__proto__`. So we will need to + * explicitly make this non-trapping, which we cannot yet express. + * @see https://github.com/tc39/proposal-stabilize + */ const makeInput = () => freeze({ __proto__: mercurialProto }); const input1 = makeInput(); const input2 = makeInput();