Skip to content

Commit 21ec6ec

Browse files
committed
Add regression test for apps named "Electron"
Addresses #415.
1 parent 283f77d commit 21ec6ec

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

test/mac.js

+25
Original file line numberDiff line numberDiff line change
@@ -610,4 +610,29 @@ module.exports = function (baseOpts) {
610610
util.setup()
611611
test('app humanReadableCopyright test', createAppHumanReadableCopyrightTest(baseOpts, 'Copyright © 2003–2015 Organization. All rights reserved.'))
612612
util.teardown()
613+
614+
util.setup()
615+
test('app named Electron packaged successfully', (t) => {
616+
let opts = Object.create(baseOpts)
617+
opts.name = 'Electron'
618+
let appPath
619+
620+
waterfall([
621+
(cb) => {
622+
packager(opts, cb)
623+
}, (paths, cb) => {
624+
appPath = path.join(paths[0], 'Electron.app')
625+
fs.stat(appPath, cb)
626+
}, (stats, cb) => {
627+
t.true(stats.isDirectory(), 'The Electron.app folder exists')
628+
fs.stat(path.join(appPath, 'Contents', 'MacOS', 'Electron'), cb)
629+
}, (stats, cb) => {
630+
t.true(stats.isFile(), 'The Electron.app/Contents/MacOS/Electron binary exists')
631+
cb()
632+
}
633+
], (err) => {
634+
t.end(err)
635+
})
636+
})
637+
util.teardown()
613638
}

0 commit comments

Comments
 (0)