Skip to content

Commit

Permalink
test(ses): Test freezing of anonymous intrinsics
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Jan 10, 2024
1 parent 4c686f6 commit 75f1219
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/ses/test/test-frozen-anon-intrinsics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import test from 'ava';
import '../index.js';

function makeArguments() {
// eslint-disable-next-line prefer-rest-params
return arguments;
}

test.before(() => {
lockdown();
});

test('arguments.callee getter is frozen', t => {
t.truthy(
Object.isFrozen(
Object.getOwnPropertyDescriptor(makeArguments(), 'callee').get,
),
);
});

0 comments on commit 75f1219

Please sign in to comment.