You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
732 B
23 lines
732 B
3 years ago
|
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(),
|
||
|
);
|
||
|
});
|
||
|
});
|