vscode-emacs-mcx icon indicating copy to clipboard operation
vscode-emacs-mcx copied to clipboard

Write command-level or keybinding-level tests

Open whitphx opened this issue 6 years ago • 1 comments

Currently the tests are only for EmacsEmulator and other classes around it, and these are more like unit tests. To test the functionalities with command and keybindings, higher level test like integration test are necessary.

TODO:

  • ~~Test that ctrl-o works on Windows~~
    • ~~After #3~~
    • ctrl-o is mapped to a built-in command and tests for it is not necessary.
    • Similar commands ctrl-m, ctrl-j mapped to emacs-mcx.newLine are already tested:
      • https://github.com/tuttieee/vscode-emacs-mcx/blob/master/src/test/commands/new-line.test.ts
  • Test that ESC works expectedly and does not override the existent keybindings.
    • #30
    • #49
  • Test that emacs-mcx.inMarkMode works in when clause.
    • #56

Ref:

  • ~~Keyboard-level test: https://github.com/VSCodeVim/Vim/blob/master/test/macro.test.ts#L13-L18~~
    • Vim extension has its own key handlers and the tests above inject keypresses in that layer, but not vscode native one. This is not appropriate in our case.

whitphx avatar Jan 11 '19 17:01 whitphx

https://github.com/VSCodeVim/Vim/blob/b6d75ca49ac2bd602f0c6391f699e448d7809f5d/test/extension.test.ts

whitphx avatar Oct 27 '20 13:10 whitphx