Skip to content

Commit

Permalink
fix: travis
Browse files Browse the repository at this point in the history
  • Loading branch information
dizel3d committed Mar 14, 2016
1 parent 51a1b9b commit 68c0920
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -18,7 +18,7 @@ var PROCESS_NAME = 'iexplore.exe'

// Find the ie executable
function getInternetExplorerExe () {
var suffix = '\\Internet Explorer\\' + PROCESS_NAME
var suffix = path.join('Internet Explorer', PROCESS_NAME)
var locations = _.map(_.compact([
process.env['PROGRAMW6432'],
process.env['PROGRAMFILES(X86)'],
Expand Down
18 changes: 9 additions & 9 deletions test/launcher.spec.js
Expand Up @@ -101,9 +101,9 @@ describe('launcher', function () {
var fsMock, win32Location

beforeEach(function () {
process.env['PROGRAMW6432'] = '\\fake\\PROGRAMW6432'
process.env['PROGRAMFILES(X86)'] = '\\fake\\PROGRAMFILES(X86)'
process.env['PROGRAMFILES'] = '\\fake\\PROGRAMFILES'
process.env['PROGRAMW6432'] = path.normalize('/fake/PROGRAMW6432')
process.env['PROGRAMFILES(X86)'] = path.normalize('/fake/PROGRAMFILES(X86)')
process.env['PROGRAMFILES'] = path.normalize('/fake/PROGRAMFILES')
fsMock = mocks.fs.create({
'folder1': {
'Internet Explorer': {
Expand All @@ -124,20 +124,20 @@ describe('launcher', function () {
})

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

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

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

Expand Down

0 comments on commit 68c0920

Please sign in to comment.