Skip to content

Commit 6d9216d

Browse files
expect exports to be instance of function
1 parent 8cbcb4b commit 6d9216d

5 files changed

Lines changed: 7 additions & 6 deletions

File tree

test/unit/acl/access-controller.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ function instantiateAccessController() {
3838
}
3939
describe('AccessController', () => {
4040
it('exists', () => {
41-
expect(AccessController).toBeTruthy()
41+
// FIXME: how can we test that it's actually a constructor?
42+
expect(AccessController).toBeInstanceOf(Function)
4243
})
4344
it('runs', () => {
4445
expect(instantiateAccessController()).toBeInstanceOf(AccessController)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
jest.mock('rdflib')
22
jest.mock('solid-auth-client')
33

4-
import * as AccessGroups from '../../../src/acl/access-groups'
4+
import { AccessGroups } from '../../../src/acl/access-groups'
55

66
describe('AccessGroups', () => {
77
it('exists', () => {
8-
expect(AccessGroups).toBeTruthy()
8+
expect(AccessGroups).toBeInstanceOf(Function)
99
})
1010
})

test/unit/acl/add-agent-buttons.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ import * as AddAgentButtons from '../../../src/acl/add-agent-buttons'
88

99
describe('AddAgentButtons', () => {
1010
it('exists', () => {
11-
expect(AddAgentButtons).toBeTruthy()
11+
expect(AddAgentButtons).toBeInstanceOf(Function)
1212
})
1313
})

test/unit/acl/styles.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ import * as Styles from '../../../src/acl/styles'
88

99
describe('Styles', () => {
1010
it('exists', () => {
11-
expect(Styles).toBeTruthy()
11+
expect(Styles).toBeInstanceOf(Object)
1212
})
1313
})

test/unit/authn/authn.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,6 @@ describe('saveUser', () => {
164164

165165
describe('solidAuthClient', () => {
166166
it('exists', () => {
167-
expect(solidAuthClient).toBeTruthy()
167+
expect(solidAuthClient).toBeInstanceOf(Function)
168168
})
169169
})

0 commit comments

Comments
 (0)