1
- import { default as liff } from ' @line/liff' ;
2
- import { act , renderHook } from ' @testing-library/react' ;
1
+ import { default as liff } from " @line/liff" ;
2
+ import { act , renderHook } from " @testing-library/react" ;
3
3
4
- import { useLoginStateManager } from ' ./use-login-state-manager' ;
4
+ import { useLoginStateManager } from " ./use-login-state-manager" ;
5
5
6
- jest . mock ( ' @line/liff' ) ;
6
+ jest . mock ( " @line/liff" ) ;
7
7
8
- describe ( ' useLoginStateManager' , ( ) => {
9
- describe ( ' When liff is undefined' , ( ) => {
8
+ describe ( " useLoginStateManager" , ( ) => {
9
+ describe ( " When liff is undefined" , ( ) => {
10
10
const render = ( ) => renderHook ( ( ) => useLoginStateManager ( undefined ) ) ;
11
11
12
- describe ( ' After the hook is initialized' , ( ) => {
13
- it ( ' return false as initial login state' , ( ) => {
12
+ describe ( " After the hook is initialized" , ( ) => {
13
+ it ( " return false as initial login state" , ( ) => {
14
14
const { result } = render ( ) ;
15
15
16
16
expect ( result . current [ 0 ] ) . toBe ( false ) ;
17
17
} ) ;
18
18
} ) ;
19
19
20
- describe ( ' After `login()` was called' , ( ) => {
21
- it ( ' return false as login state' , ( ) => {
20
+ describe ( " After `login()` was called" , ( ) => {
21
+ it ( " return false as login state" , ( ) => {
22
22
const { result } = render ( ) ;
23
23
24
24
act ( ( ) => {
@@ -29,8 +29,8 @@ describe('useLoginStateManager', () => {
29
29
} ) ;
30
30
} ) ;
31
31
32
- describe ( ' After `logout()` was called' , ( ) => {
33
- it ( ' return true as login state' , ( ) => {
32
+ describe ( " After `logout()` was called" , ( ) => {
33
+ it ( " return true as login state" , ( ) => {
34
34
const { result } = render ( ) ;
35
35
36
36
act ( ( ) => {
@@ -42,19 +42,19 @@ describe('useLoginStateManager', () => {
42
42
} ) ;
43
43
} ) ;
44
44
45
- describe ( ' When liff is defined' , ( ) => {
45
+ describe ( " When liff is defined" , ( ) => {
46
46
const render = ( ) => renderHook ( ( ) => useLoginStateManager ( liff ) ) ;
47
47
48
- describe ( ' After the hook is initialized' , ( ) => {
49
- it ( ' return false as initial login state' , ( ) => {
48
+ describe ( " After the hook is initialized" , ( ) => {
49
+ it ( " return false as initial login state" , ( ) => {
50
50
const { result } = render ( ) ;
51
51
52
52
expect ( result . current [ 0 ] ) . toBe ( false ) ;
53
53
} ) ;
54
54
} ) ;
55
55
56
- describe ( ' After `login()` was called' , ( ) => {
57
- it ( ' return true as login state' , ( ) => {
56
+ describe ( " After `login()` was called" , ( ) => {
57
+ it ( " return true as login state" , ( ) => {
58
58
const { result } = render ( ) ;
59
59
60
60
act ( ( ) => {
@@ -65,8 +65,8 @@ describe('useLoginStateManager', () => {
65
65
} ) ;
66
66
} ) ;
67
67
68
- describe ( ' After `logout()` was called' , ( ) => {
69
- it ( ' return true as login state' , ( ) => {
68
+ describe ( " After `logout()` was called" , ( ) => {
69
+ it ( " return true as login state" , ( ) => {
70
70
const { result } = render ( ) ;
71
71
72
72
act ( ( ) => {
0 commit comments