File tree 1 file changed +7
-8
lines changed
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
2
2
const test = require ( 'ava' )
3
3
const sinon = require ( 'sinon' )
4
- const os = require ( 'os' )
5
4
const Profile = require ( '../../src/profile' )
6
5
7
6
test . beforeEach ( ( t ) => {
@@ -15,7 +14,8 @@ test.beforeEach((t) => {
15
14
record : sinon . stub ( ) ,
16
15
keys : { }
17
16
}
18
- sinon . stub ( os , 'homedir' ) . returns ( '' )
17
+ Profile . prototype . inHome = ( ...args ) => args . pop ( )
18
+ Profile . prototype . inConfig = ( ...args ) => args . pop ( )
19
19
t . context . profile = new Profile ( { config, runlog } )
20
20
} )
21
21
@@ -27,16 +27,15 @@ test('writes to all shell and power profiles for system with all shells and powe
27
27
detectedShellFormatProfiles,
28
28
detectedPowerFormatProfiles
29
29
} = await profile . _detectProfiles ( )
30
- t . deepEqual ( detectedShellFormatProfiles , [
30
+ t . deepEqual ( [
31
31
'.profile' ,
32
32
'.kshrc' ,
33
33
'.zshrc' ,
34
34
'.zprofile' ,
35
35
'.bashrc' ,
36
36
'.bash_profile'
37
- ] )
38
- t . deepEqual ( detectedPowerFormatProfiles , [
39
- '.config/powershell/Microsoft.PowerShell_profile.ps1' ,
40
- 'Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1'
41
- ] )
37
+ ] , detectedShellFormatProfiles )
38
+ t . deepEqual ( [
39
+ 'Microsoft.PowerShell_profile.ps1'
40
+ ] , detectedPowerFormatProfiles )
42
41
} )
You can’t perform that action at this time.
0 commit comments