mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-05 07:35:34 +08:00
fc4b3b56d7
Summary: Fixes: T1334 remove final InboxApp references move out all underscore-plus methods Mass find and replace of underscore-plus sed -i '' -- 's/underscore-plus/underscore/g' **/*.coffee sed -i '' -- 's/underscore-plus/underscore/g' **/*.cjsx Test Plan: edgehill --test Reviewers: bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D1534
19 lines
522 B
CoffeeScript
19 lines
522 B
CoffeeScript
# Utils for testing.
|
|
CSON = require 'season'
|
|
KeymapManager = require 'atom-keymap'
|
|
|
|
NylasTestUtils =
|
|
loadKeymap: (keymapPath) ->
|
|
baseKeymaps = CSON.readFileSync("keymaps/base.cson")
|
|
atom.keymaps.add("keymaps/base.cson", baseKeymaps)
|
|
|
|
if keymapPath?
|
|
keymapFile = CSON.readFileSync(keymapPath)
|
|
atom.keymaps.add(keymapPath, keymapFile)
|
|
|
|
keyPress: (key, target) ->
|
|
event = KeymapManager.buildKeydownEvent(key, target: target)
|
|
document.dispatchEvent(event)
|
|
|
|
module.exports = NylasTestUtils
|
|
|