forked from SolidOS/solid-logic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsolidAuthLogic.test.ts
More file actions
49 lines (42 loc) · 1.16 KB
/
solidAuthLogic.test.ts
File metadata and controls
49 lines (42 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* @jest-environment jsdom
*
*/
import { SolidAuthnLogic } from '../src/authn/SolidAuthnLogic'
import { silenceDebugMessages } from './helpers/debugger'
import { authSession } from '../src/authSession/authSession'
import { AuthenticationContext } from '../src/types'
silenceDebugMessages()
let solidAuthnLogic
describe('SolidAuthnLogic', () => {
beforeEach(() => {
solidAuthnLogic = new SolidAuthnLogic(authSession)
})
describe('checkUser', () => {
it('exists', () => {
expect(solidAuthnLogic.checkUser).toBeInstanceOf(Function)
})
it('runs', async () => {
expect(await solidAuthnLogic.checkUser()).toEqual(null)
})
})
describe('currentUser', () => {
it('exists', () => {
expect(solidAuthnLogic.currentUser).toBeInstanceOf(Function)
})
it('runs', async () => {
expect(await solidAuthnLogic.currentUser()).toEqual(null)
})
})
describe('saveUser', () => {
it('exists', () => {
expect(solidAuthnLogic.saveUser).toBeInstanceOf(Function)
})
it('runs', () => {
expect(solidAuthnLogic.saveUser(
'',
{} as AuthenticationContext
)).toEqual(null)
})
})
})