1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00
metamask-extension/test/unit-global/protect-intrinsics.test.js
Erik Marks 5f0fd9d1c2
Add lockdown e2e test (#12562)
This PR adds an e2e test to ensure that the background and UI environments are locked down. It reuses the logic from the `protect-intrinsics.test.js`, and runs in both Chrome and Firefox.
2021-11-02 17:01:01 -07:00

16 lines
425 B
JavaScript

import 'ses/lockdown';
import '../../app/scripts/lockdown-run';
import '../../app/scripts/lockdown-more';
import {
getGlobalProperties,
testIntrinsic,
} from '../helpers/protect-intrinsics-helpers';
describe('non-modifiable intrinsics', function () {
getGlobalProperties().forEach((propertyName) => {
it(`intrinsic globalThis["${propertyName}"]`, function () {
testIntrinsic(propertyName);
});
});
});