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();