File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,19 +4,38 @@ import * as AclControl from '../../../src/acl/acl-control'
44import { acl , aclControl } from '../../../src/acl/index'
55
66silenceDebugMessages ( )
7- jest . mock ( 'solid-auth-client' )
87
9- describe ( 'acl/index:acl' , ( ) => {
10- it ( 'exports all of acl/acl' , ( ) => {
11- for ( const k in Acl ) {
12- if ( k !== 'getProspectiveHolder' ) {
13- expect ( acl [ k ] ) . toEqual ( Acl [ k ] )
14- }
15- }
8+ describe ( 'acl related APIs' , ( ) => {
9+ it ( 'exports some methods in the acl module' , ( ) => {
10+ expect ( Acl ) . toEqual ( expect . objectContaining ( acl ) )
11+ expect ( [
12+ 'adoptACLDefault' ,
13+ 'readACL' ,
14+ 'sameACL' ,
15+ 'ACLunion' ,
16+ 'loadUnionACL' ,
17+ 'ACLbyCombination' ,
18+ 'makeACLGraph' ,
19+ 'makeACLGraphbyCombo' ,
20+ 'ACLToString' ,
21+ 'comboToString' ,
22+ 'makeACLString' ,
23+ 'putACLObject' ,
24+ 'putACLbyCombo' ,
25+ 'fixIndividualCardACL' ,
26+ 'fixIndividualACL' ,
27+ 'setACL' ,
28+ 'getACLorDefault' ,
29+ 'getACL'
30+ ] ) . toEqual ( expect . arrayContaining ( Object . keys ( acl ) ) )
1631 } )
17- it ( 'exports all of acl/acl-control' , ( ) => {
18- for ( const k in AclControl ) {
19- expect ( aclControl [ k ] ) . toEqual ( AclControl [ k ] )
20- }
32+
33+ it ( 'exposes some methods of acl-control module' , ( ) => {
34+ expect ( AclControl ) . toEqual ( expect . objectContaining ( aclControl ) )
35+ expect ( [
36+ 'preventBrowserDropEvents' ,
37+ 'shortNameForFolder' ,
38+ 'ACLControlBox5'
39+ ] ) . toEqual ( expect . arrayContaining ( Object . keys ( aclControl ) ) )
2140 } )
2241} )
You can’t perform that action at this time.
0 commit comments