mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-01 21:57:06 +01:00
23 lines
732 B
JavaScript
23 lines
732 B
JavaScript
|
import { endowmentPermissionBuilders } from '@metamask/snap-controllers';
|
||
|
import { restrictedMethodPermissionBuilders } from '@metamask/rpc-methods';
|
||
|
import { EndowmentPermissions, RestrictedMethods } from './permissions';
|
||
|
|
||
|
describe('EndowmentPermissions', () => {
|
||
|
it('has the expected permission keys', () => {
|
||
|
expect(Object.keys(EndowmentPermissions).sort()).toStrictEqual(
|
||
|
Object.keys(endowmentPermissionBuilders).sort(),
|
||
|
);
|
||
|
});
|
||
|
});
|
||
|
|
||
|
describe('RestrictedMethods', () => {
|
||
|
it('has the expected permission keys', () => {
|
||
|
expect(Object.keys(RestrictedMethods).sort()).toStrictEqual(
|
||
|
[
|
||
|
'eth_accounts',
|
||
|
...Object.keys(restrictedMethodPermissionBuilders),
|
||
|
].sort(),
|
||
|
);
|
||
|
});
|
||
|
});
|