@@ -10,13 +10,13 @@ const describeIfUnix = isWindows ? describe.skip : describe;
10
10
11
11
const splitKey = isWindows ? '\\' : '/' ;
12
12
13
- describe ( 'get-config -path' , ( ) => {
13
+ describe ( 'get-store -path' , ( ) => {
14
14
describe ( 'extension' , ( ) => {
15
15
describe ( 'when absent' , ( ) => {
16
- it ( 'should skip extension' , ( ) => {
16
+ it ( 'should add .haf extension' , ( ) => {
17
17
const path = getStorePath ( 'pop' ) ;
18
18
19
- const index = path . split ( splitKey ) . lastIndexOf ( 'pop' ) ;
19
+ const index = path . split ( splitKey ) . lastIndexOf ( 'pop.haf ' ) ;
20
20
21
21
expect ( index ) . toBeGreaterThanOrEqual ( 0 ) ;
22
22
} ) ;
@@ -47,7 +47,7 @@ describe('get-config-path', () => {
47
47
it ( 'should respect CONFIG_DIR' , ( ) => {
48
48
const path = getStorePath ( 'pop' ) ;
49
49
50
- expect ( path ) . toEqual ( '/home/config_dir/pop' ) ;
50
+ expect ( path ) . toEqual ( '/home/config_dir/pop.haf ' ) ;
51
51
} ) ;
52
52
} ) ;
53
53
@@ -63,15 +63,15 @@ describe('get-config-path', () => {
63
63
it ( 'should respect XDG_CONFIG_HOME' , ( ) => {
64
64
const path = getStorePath ( 'pop' ) ;
65
65
66
- expect ( path ) . toEqual ( '/home/xdg_config_home/pop' ) ;
66
+ expect ( path ) . toEqual ( '/home/xdg_config_home/pop.haf ' ) ;
67
67
} ) ;
68
68
} ) ;
69
69
70
70
describe ( 'when fallback' , ( ) => {
71
71
const spy = jest . spyOn ( os , 'homedir' ) ;
72
72
73
73
beforeEach ( ( ) => {
74
- spy . mockReturnValue ( '/Users/anda ' ) ;
74
+ spy . mockReturnValue ( '/Users/pop ' ) ;
75
75
} ) ;
76
76
77
77
afterEach ( ( ) => {
@@ -81,7 +81,7 @@ describe('get-config-path', () => {
81
81
it ( 'should put under ~/.config' , ( ) => {
82
82
const path = getStorePath ( 'pop' ) ;
83
83
84
- expect ( path ) . toEqual ( '/Users/anda /.config/pop' ) ;
84
+ expect ( path ) . toEqual ( '/Users/pop /.config/pop.haf ' ) ;
85
85
} ) ;
86
86
} ) ;
87
87
} ) ;
@@ -98,7 +98,7 @@ describe('get-config-path', () => {
98
98
it ( 'should deal with WINDOWS' , ( ) => {
99
99
const path = getStorePath ( 'pop' ) ;
100
100
101
- expect ( path ) . toEqual ( 'C:\\Users\\Pop\\ApplicationData\\pop' ) ;
101
+ expect ( path ) . toEqual ( 'C:\\Users\\Pop\\ApplicationData\\pop.haf ' ) ;
102
102
} ) ;
103
103
} ) ;
104
104
} ) ;
0 commit comments