Skip to content

Commit 50aab68

Browse files
Fix test/unit/authn/authn.test.ts
1 parent eb26cbe commit 50aab68

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

test/unit/authn/authn.test.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,23 @@ describe('logInLoadProfile', () => {
116116
it('exists', () => {
117117
expect(logInLoadProfile).toBeInstanceOf(Function)
118118
})
119-
it('runs', () => {
120-
expect(logInLoadProfile({})).toBeInstanceOf(Object)
119+
it('runs', async () => {
120+
expect.assertions(1)
121+
await logInLoadProfile({}).catch((e) => {
122+
expect(e.message).toEqual('Could not log in')
123+
})
121124
})
122125
})
123126

124127
describe('logInLoadPreferences', () => {
125128
it('exists', () => {
126129
expect(logInLoadPreferences).toBeInstanceOf(Function)
127130
})
128-
it('runs', () => {
129-
expect(logInLoadPreferences({})).toBeInstanceOf(Object)
131+
it('runs', async () => {
132+
expect.assertions(1)
133+
await logInLoadPreferences({}).catch((e) => {
134+
expect(e.message).toEqual('(via loadPrefs) Error: Could not log in')
135+
})
130136
})
131137
})
132138

0 commit comments

Comments
 (0)