Coder Social home page Coder Social logo

exunit.el's Introduction

exunit

https://melpa.org/packages/exunit-badge.svg

Provides commands to run ExUnit tests. The output is syntax highlighted and stacktraces are navigatable.

Setup

exunit is available in melpa and can be installed via package-install command.

(add-hook 'elixir-mode-hook 'exunit-mode)

;; Optionally configure `transient-default-level' to 5 to show extra switches
;; Or use `C-x l' to change the level of individual commands and switches
(setq transient-default-level 5) ;; default is 4

Currently, 2 extra switches are shown, --exclude and --include.

Commands

KeyboardDescription
C-c , aexunit-verify-all Run all the tests in the current project
C-c , uexunit-verify-all-in-umbrella Run all the tests in the current umbrella project
C-c , vexunit-verify Run all the tests in the current buffer, or the test file corresponding to the current buffer
C-c , sexunit-verify-single Run the test under the point
C-c , rexunit-rerun Re-run the last test invocation
C-c , texunit-toggle-file-and-test Toggle between a file and its tests in the current window
C-c , dexunit-debug Run the test under the point in IEx shell. Supports IEx.pry method for debugging.
C-c , 4 texunit-toggle-file-and-test-other-window Toggle between a file and its tests in other window

Invoking any of these commands with a prefix argument C-u will cause a prompt to be shown for additional arguments before the test(s) are run.

https://raw.githubusercontent.com/ananthakumaran/exunit.el/master/screenshots/sample.png

Run tests in a docker

For example, you can redefine an exunit-mix-command to the following to execute in backend service context:

(setq exunit-mix-command
      (lambda (args)
        (let* ((args (s-join " " args))
               (mix-command (concat "'mix test " args "'")))
          ;; Adjust to your needs
          (list "docker-compose" "exec" "backend" "sh" "-c" mix-command))))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.