Skip to content

Commit 68c0920

Browse files
committed
fix: travis
1 parent 51a1b9b commit 68c0920

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var PROCESS_NAME = 'iexplore.exe'
1818

1919
// Find the ie executable
2020
function getInternetExplorerExe () {
21-
var suffix = '\\Internet Explorer\\' + PROCESS_NAME
21+
var suffix = path.join('Internet Explorer', PROCESS_NAME)
2222
var locations = _.map(_.compact([
2323
process.env['PROGRAMW6432'],
2424
process.env['PROGRAMFILES(X86)'],

test/launcher.spec.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ describe('launcher', function () {
101101
var fsMock, win32Location
102102

103103
beforeEach(function () {
104-
process.env['PROGRAMW6432'] = '\\fake\\PROGRAMW6432'
105-
process.env['PROGRAMFILES(X86)'] = '\\fake\\PROGRAMFILES(X86)'
106-
process.env['PROGRAMFILES'] = '\\fake\\PROGRAMFILES'
104+
process.env['PROGRAMW6432'] = path.normalize('/fake/PROGRAMW6432')
105+
process.env['PROGRAMFILES(X86)'] = path.normalize('/fake/PROGRAMFILES(X86)')
106+
process.env['PROGRAMFILES'] = path.normalize('/fake/PROGRAMFILES')
107107
fsMock = mocks.fs.create({
108108
'folder1': {
109109
'Internet Explorer': {
@@ -124,20 +124,20 @@ describe('launcher', function () {
124124
})
125125

126126
it('should locate in PROGRAMW6432', function (done) {
127-
process.env['' + 'PROGRAMW6432'] = '\\folder1'
128-
expect(win32Location()).to.equal('\\folder1\\Internet Explorer\\iexplore.exe')
127+
process.env['' + 'PROGRAMW6432'] = path.normalize('/folder1')
128+
expect(win32Location()).to.equal(path.normalize('/folder1/Internet Explorer/iexplore.exe'))
129129
done()
130130
})
131131

132132
it('should locate in PROGRAMFILES(X86)', function (done) {
133-
process.env['' + 'PROGRAMFILES(X86)'] = '\\folder1'
134-
expect(win32Location()).to.equal('\\folder1\\Internet Explorer\\iexplore.exe')
133+
process.env['' + 'PROGRAMFILES(X86)'] = path.normalize('/folder1')
134+
expect(win32Location()).to.equal(path.normalize('/folder1/Internet Explorer/iexplore.exe'))
135135
done()
136136
})
137137

138138
it('should locate in PROGRAMFILES', function (done) {
139-
process.env['' + 'PROGRAMFILES'] = '\\folder1'
140-
expect(win32Location()).to.equal('\\folder1\\Internet Explorer\\iexplore.exe')
139+
process.env['' + 'PROGRAMFILES'] = path.normalize('/folder1')
140+
expect(win32Location()).to.equal(path.normalize('/folder1/Internet Explorer/iexplore.exe'))
141141
done()
142142
})
143143

0 commit comments

Comments
 (0)