Skip to content

Commit a994f30

Browse files
committed
Fixing acl related modules API tests
1 parent a8f18e2 commit a994f30

1 file changed

Lines changed: 31 additions & 12 deletions

File tree

test/unit/acl/index.test.ts

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,38 @@ import * as AclControl from '../../../src/acl/acl-control'
44
import { acl, aclControl } from '../../../src/acl/index'
55

66
silenceDebugMessages()
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
})

0 commit comments

Comments
 (0)