Bind cmd/ctrl-w to close window in tests

Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
This commit is contained in:
Nathan Sobo
2015-10-02 12:56:15 -06:00
parent 3d5f6c858d
commit 4a00d6ba35

View File

@@ -22,6 +22,10 @@ try
if (event.metaKey or event.ctrlKey) and event.altKey and event.keyCode is 73
ipc.send('call-window-method', 'toggleDevTools')
# Reload: cmd-w / ctrl-w
if (event.metaKey or event.ctrlKey) and event.keyCode is 87
ipc.send('call-window-method', 'close')
# Add 'exports' to module search path.
exportsPath = path.join(atom.getLoadSettings().resourcePath, 'exports')
require('module').globalPaths.push(exportsPath)